Documentation ¶
Index ¶
- func AssertContains(t *testing.T, actual, expected string)
- func AssertContainsMatch(t *testing.T, actual, exp string)
- func AssertEq(t *testing.T, actual, expected interface{})
- func AssertError(t *testing.T, actual error, expected string)
- func AssertMatch(t *testing.T, actual string, expected string)
- func AssertNil(t *testing.T, actual interface{})
- func AssertNotContains(t *testing.T, actual, expected string)
- func AssertNotContainsMatch(t *testing.T, actual, exp string)
- func AssertNotNil(t *testing.T, actual interface{})
- func AssertOnTarEntry(t *testing.T, tarFile, entryPath string, assertFns ...TarEntryAssertion)
- func AssertSameInstance(t *testing.T, actual, expected interface{})
- func AssertSliceContains(t *testing.T, slice []string, value string)
- func AssertUnique(t *testing.T, items ...interface{})
- func CopyFile(t *testing.T, src, dst string)
- func CreateImageOnLocal(t *testing.T, dockerCli *client.Client, repoName, dockerFile string)
- func CreateImageOnRemote(t *testing.T, dockerCli *client.Client, registryConfig *TestRegistryConfig, ...) string
- func CreateTAR(t *testing.T, srcDir, tarDir string, mode int64) string
- func CreateTGZ(t *testing.T, srcDir, tarDir string, mode int64) string
- func Digest(t *testing.T, repoName string) string
- func DockerRmi(dockerCli *client.Client, repoNames ...string) error
- func Eventually(t *testing.T, test func() bool, every time.Duration, timeout time.Duration)
- func GetFreePort() (string, error)
- func HTTPGetE(url string, headers map[string]string) (string, error)
- func ImageID(t *testing.T, repoName string) string
- func ListTarContents(tarPath string) ([]tar.Header, error)
- func PullImageWithAuth(dockerCli *client.Client, ref, registryAuth string) error
- func PushImage(dockerCli *client.Client, ref string, registryConfig *TestRegistryConfig) error
- func RandString(n int) string
- func RecursiveCopy(t *testing.T, src, dst string)
- func RequireDocker(t *testing.T)
- func Run(t *testing.T, cmd *exec.Cmd) string
- func RunContainer(ctx context.Context, dockerCli *client.Client, id string, stdout io.Writer, ...) error
- func RunE(cmd *exec.Cmd) (string, error)
- func SkipIf(t *testing.T, expression bool, reason string)
- func TopLayerDiffID(t *testing.T, repoName string) string
- type TarEntryAssertion
- func ContentEquals(expected string) TarEntryAssertion
- func HasFileMode(expectedMode int64) TarEntryAssertion
- func HasModTime(expectedTime time.Time) TarEntryAssertion
- func HasOwnerAndGroup(expectedUID int, expectedGID int) TarEntryAssertion
- func IsDirectory() TarEntryAssertion
- func SymlinksTo(expectedTarget string) TarEntryAssertion
- type TestRegistryConfig
- func (rc *TestRegistryConfig) AuthConfig() dockertypes.AuthConfig
- func (rc *TestRegistryConfig) Login(t *testing.T, username string, password string)
- func (rc *TestRegistryConfig) RegistryAuth() string
- func (rc *TestRegistryConfig) RegistryCatalog() (string, error)
- func (rc *TestRegistryConfig) RepoName(name string) string
- func (rc *TestRegistryConfig) StopRegistry(t *testing.T)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertContains ¶
func AssertContainsMatch ¶ added in v0.1.0
func AssertNotContains ¶ added in v0.1.0
func AssertNotContainsMatch ¶ added in v0.5.0
func AssertNotNil ¶
func AssertOnTarEntry ¶ added in v0.2.0
func AssertOnTarEntry(t *testing.T, tarFile, entryPath string, assertFns ...TarEntryAssertion)
func AssertSameInstance ¶
Assert the simplistic pointer (or literal value) equality
func AssertUnique ¶ added in v0.5.0
func CreateImageOnLocal ¶
func CreateImageOnRemote ¶
func Eventually ¶
func GetFreePort ¶ added in v0.3.0
func PullImageWithAuth ¶ added in v0.1.0
func PushImage ¶ added in v0.1.0
func PushImage(dockerCli *client.Client, ref string, registryConfig *TestRegistryConfig) error
func RandString ¶
func RecursiveCopy ¶ added in v0.1.0
func RequireDocker ¶ added in v0.1.0
func RunContainer ¶ added in v0.2.0
Types ¶
type TarEntryAssertion ¶ added in v0.2.0
func ContentEquals ¶ added in v0.2.0
func ContentEquals(expected string) TarEntryAssertion
func HasFileMode ¶ added in v0.2.0
func HasFileMode(expectedMode int64) TarEntryAssertion
func HasModTime ¶ added in v0.5.0
func HasModTime(expectedTime time.Time) TarEntryAssertion
func HasOwnerAndGroup ¶ added in v0.2.0
func HasOwnerAndGroup(expectedUID int, expectedGID int) TarEntryAssertion
func IsDirectory ¶ added in v0.3.0
func IsDirectory() TarEntryAssertion
func SymlinksTo ¶ added in v0.2.0
func SymlinksTo(expectedTarget string) TarEntryAssertion
type TestRegistryConfig ¶ added in v0.1.0
type TestRegistryConfig struct { RunRegistryPort string DockerConfigDir string // contains filtered or unexported fields }
func RunRegistry ¶
func RunRegistry(t *testing.T, seedRegistry bool) *TestRegistryConfig
func (*TestRegistryConfig) AuthConfig ¶ added in v0.2.0
func (rc *TestRegistryConfig) AuthConfig() dockertypes.AuthConfig
func (*TestRegistryConfig) Login ¶ added in v0.2.0
func (rc *TestRegistryConfig) Login(t *testing.T, username string, password string)
func (*TestRegistryConfig) RegistryAuth ¶ added in v0.1.0
func (rc *TestRegistryConfig) RegistryAuth() string
func (*TestRegistryConfig) RegistryCatalog ¶ added in v0.1.0
func (rc *TestRegistryConfig) RegistryCatalog() (string, error)
func (*TestRegistryConfig) RepoName ¶ added in v0.1.0
func (rc *TestRegistryConfig) RepoName(name string) string
func (*TestRegistryConfig) StopRegistry ¶ added in v0.1.0
func (rc *TestRegistryConfig) StopRegistry(t *testing.T)
Click to show internal directories.
Click to hide internal directories.