Documentation ¶
Index ¶
- Constants
- func DefaultBinds(t *testing.T, rootDir string) []string
- func ExecEnvbox(t *testing.T, pool *dockertest.Pool, conf ExecConfig) ([]byte, error)
- func ExecInnerContainer(t *testing.T, pool *dockertest.Pool, conf ExecConfig) ([]byte, error)
- func RunEnvbox(t *testing.T, pool *dockertest.Pool, conf *CreateDockerCVMConfig) *dockertest.Resource
- func TmpDir(t *testing.T) string
- func WaitForCVMDocker(t *testing.T, pool *dockertest.Pool, resource *dockertest.Resource, ...)
- type CreateDockerCVMConfig
- type ExecConfig
Constants ¶
View Source
const ( // DockerdImage is a large image (~1GB) and should only be used to test // dockerd. DockerdImage = "gcr.io/coder-dev-1/sreya/enterprise-base:ubuntu" // HelloWorldImage is useful for testing a CVM's dockerd is functioning // correctly HelloWorldImage = "gcr.io/coder-dev-1/sreya/hello-world" // UbuntuImage is just vanilla ubuntu (80MB) but the user is set to a non-root // user . UbuntuImage = "gcr.io/coder-dev-1/sreya/ubuntu-coder" )
Variables ¶
This section is empty.
Functions ¶
func DefaultBinds ¶
DefaultBinds returns the minimum amount of mounts necessary to spawn envbox successfully. Since envbox will chown some of these directories to root, they cannot be cleaned up post-test, meaning that it may be necesssary to manually clear /tmp from time to time.
func ExecEnvbox ¶
func ExecEnvbox(t *testing.T, pool *dockertest.Pool, conf ExecConfig) ([]byte, error)
ExecEnvbox runs a command in the outer container.
func ExecInnerContainer ¶
func ExecInnerContainer(t *testing.T, pool *dockertest.Pool, conf ExecConfig) ([]byte, error)
ExecInnerContainer runs a command in the inner container.
func RunEnvbox ¶
func RunEnvbox(t *testing.T, pool *dockertest.Pool, conf *CreateDockerCVMConfig) *dockertest.Resource
RunEnvbox runs envbox, it returns once the inner container has finished spinning up.
Types ¶
type CreateDockerCVMConfig ¶
type ExecConfig ¶
Click to show internal directories.
Click to hide internal directories.