Expand description

EggShell automatically cleans up all the containers it creates when the ship is destroyed. It uses the bollard docker toolkit, and tokio internally to manage the containers. To utilize, simply create containers through it and wait for EggShell to go away. It will automatically trigger its Drop implementation which will destroy the containers.

EggShell requires a multi-threaded tokio async runtime to function. Please create one in your environment that tokio can “find” with the tokio::runtime::Handle::current() call.

If you want to handle signals in your tests, call supervise_signals().

Structs

EggShell is basically a container for containers. When provided a docker client, it funnels all container create operations through it, allowing it to track what needs to be cleaned up. At drop() time (or when teardown() is called), these containers are cleaned up.

Enums

DockerError covers only errors that are from docker specifically.

Error is a top-level error enum for EggShell.

Functions

Please call this function in your tests with tokio::spawn() to handle signals being sent to your tests. A wait function can be supplied to perform any final settling before terminating the test program.