Documentation
¶
Overview ¶
Package testimage builds images with EICAR test files at runtime and serves them from an in-memory registry. It backs the tests and `meles selftest`, which checks the whole chain (registry pull, layer extraction, engine) without an EICAR image in any real registry.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildPlatform ¶
BuildPlatform creates an image for platform p from layers.
Types ¶
type Case ¶
type Case struct {
Name string
Layers []Layer
// Want lists the expected findings as "path status", e.g.
// "/opt/eicar.com present". Empty means clean.
Want []string
}
Case is a test image and the result meles must report for it.
type Registry ¶
type Registry struct {
Host string
// contains filtered or unexported fields
}
Registry is an in-memory registry with the test images.
func Serve ¶
Serve starts an in-memory registry and pushes the given cases to it. References must be parsed with name.Insecure (plain HTTP).
func (*Registry) RequireAuth ¶
RequireAuth makes the registry refuse requests without these basic auth credentials, like a private registry. Push before calling it.