Documentation
¶
Overview ¶
Package fixture builds sampleapp as v1 and v2, installs v1 and serves v2, for the suites that exercise real binaries. Test-only: it imports testing and httptest, which is why it is not part of testkit, which production code imports for its kill hooks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildSampleApp ¶
BuildSampleApp builds testdata/sampleapp with the otatest tag and returns its bytes.
func ModuleRoot ¶
ModuleRoot is the ota module directory, found by walking up from the test's working directory.
Types ¶
type Fixture ¶
type Fixture struct {
T *testing.T
Bin string
V1, V2 []byte
Marker string
Env []string
Store *server.MemStore
}
Fixture is sampleapp v1 installed, and v2 offered by a real server.
func NewFixture ¶
NewFixture builds v1 and v2, installs v1, and serves an offer for v2 signed by signWith (a fresh trusted key when nil).
func (*Fixture) Command ¶
Command returns an exec.Cmd for the installed binary with the fixture env.