Documentation
¶
Overview ¶
Package agenttest is a fixture that drives agent.Run in-process as a plain user against a local git repository, for the agent's own tests and the conformance suite.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fixture ¶
type Fixture struct {
Repo, Root string
Spec agent.Spec
K []byte
HTTP *http.Client
Deadline time.Time
SelfDelete func()
// NoListener runs the job in no-listener mode (spec port -1): there is no results server and
// the agent exits by itself after result.json, so Run does not set NoServe.
NoListener bool
// System replaces PlainSystem; StateRoot, SelfSHA, KeyRoot and KeepAlive are Options' fields.
System agent.System
StateRoot string
SelfSHA func() (string, error)
KeyRoot string
KeepAlive *agent.KeepAliveConf
}
Fixture is one fake job: a repo with run.sh and sub/keep, and the spec that clones it.
func NewFixture ¶
NewFixture commits script as run.sh in a fresh repo and prepares a spec for it.