Documentation
¶
Overview ¶
Package testenv boots an openrun server from the working tree for the browser-driven suites under tests/ui. Each test binary starts its own instance on its own ports in a temp OPENRUN_HOME. With GOCOVERDIR set the binary is built coverage-instrumented and the server writes its coverage data there, the CLI invocations to the sibling client directory, matching tests/run_cli_tests.sh so covtest merges all of it. OPENRUN_TEST_BIN names a prebuilt binary to use instead of building one.
Index ¶
Constants ¶
const AdminPass = "qwerty" // matches the bcrypt hash in the generated config
Variables ¶
This section is empty.
Functions ¶
func RepoRoot ¶
func RepoRoot() string
RepoRoot returns the openrun repo root, derived from this file's location (tests/ui/testenv)
func TestappSource ¶
func TestappSource() string
TestappSource is the standard test app (tests/testapp)
Types ¶
type Env ¶
type Env struct {
Port int
RepoRoot string
HomeDir string
BinPath string
// contains filtered or unexported fields
}
Env is a running openrun server
func (*Env) CLIEnv ¶
CLIEnv is the environment for CLI invocations: like ServerEnv, with the client coverage data going to the sibling client directory of GOCOVERDIR (the run_cli_tests.sh convention) and the OS keyring off so stored logins land in the test home
type Options ¶
type Options struct {
// HTTPSPort enables the HTTPS listener on that port (off by default)
HTTPSPort int
// SecurityExtra and SystemExtra are lines appended inside the [security]
// and [system] tables; ExtraConfig is appended after them for further
// tables ([api], [auth.*], ...)
SecurityExtra string
SystemExtra string
ExtraConfig string
}
Options customize the generated openrun.toml. The base config sets the admin password (AdminPass) and the http port