Documentation
¶
Overview ¶
Package evalenv is what the evaluator's integration tests need: the Web UI started for real inside the test process (see package stack), with a scripted agent behind it and a real PostgreSQL, and the way the evaluator starts Chrome.
It needs Docker (for PostgreSQL, see pgenv) and, for tests that open a browser, Node and Chrome.
Index ¶
Constants ¶
const ( Email = "eval@example.com" Password = "an-evaluator-password-1" )
The first user of every environment.
Variables ¶
This section is empty.
Functions ¶
func BrowserOptions ¶
BrowserOptions is how the evaluator starts Chrome unless it is told otherwise, so that these tests move with its pinned version.
func RequireBrowser ¶
RequireBrowser is for the tests that open Chrome: it asks for npx, and for a node that the pinned package runs on. A missing prerequisite is a failure, not a skip: a run that leaves the browser suites out must say so, or the gate reads as green for what was never run. -short leaves them out on purpose.
Types ¶
type Env ¶
type Env struct {
// URL is where a browser reaches it, such as http://127.0.0.1:41233.
URL string
Email, Password string
// Agent is the scripted agent behind the Web UI.
Agent *stack.Agent
// Model is the model the agent runs, for assertions on what it saw.
Model *testagent.Model
// Logs is what the Web UI logged: one line per request, and its warnings and
// errors. Print the lines that matter when a test fails.
Logs *Logs
}
Env is a running Web UI.