Documentation
¶
Overview ¶
Package dockertest fakes the Docker Engine API, so tests of services that run containers pass without an engine.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
Port int // the host port inspect reports; point it at a listener of the test
Down bool // answer like an engine that is not running
// contains filtered or unexported fields
}
Engine records what services ask of it, docker CLI style: "create --name n -p 127.0.0.1:h:p -e K=V image args…", "start n", "stop n", "restart n", "exec n cmd…", "rm -f -v n", and for volumes "volume create v", "volume rm v" and "bind n v:/path" (a container's named volume). Every published port is Port on inspect.
func (*Engine) DropVolume ¶ added in v0.2.0
DropVolume forgets a volume, as if someone removed it behind pogi's back.
Click to show internal directories.
Click to hide internal directories.