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 AssertFalse(t *testing.T, actual interface{})
- func AssertIncludeAllExpectedPatterns(t *testing.T, receivedArgs []string, expectedPatterns ...[]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, tarPath, entryPath string, assertFns ...TarEntryAssertion)
- func AssertSameInstance(t *testing.T, actual, expected interface{})
- func AssertSliceContains(t *testing.T, slice []string, expected ...string)
- func AssertSliceContainsMatch(t *testing.T, slice []string, expected ...string)
- func AssertSliceContainsOnly(t *testing.T, slice []string, expected ...string)
- func AssertSliceNotContains(t *testing.T, slice []string, expected ...string)
- func AssertTarball(t *testing.T, path string)
- func AssertTrue(t *testing.T, actual interface{})
- func AssertUnique(t *testing.T, items ...interface{})
- func CopyFile(t *testing.T, src, dst string)
- func CreateImage(t *testing.T, dockerCli client.CommonAPIClient, repoName, dockerFile string)
- func CreateImageFromDir(t *testing.T, dockerCli client.CommonAPIClient, repoName string, dir string)
- func CreateImageOnRemote(t *testing.T, dockerCli client.CommonAPIClient, ...) 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.CommonAPIClient, repoNames ...string) error
- func Eventually(t *testing.T, test func() bool, every time.Duration, timeout time.Duration)
- func HTTPGetE(url string, headers map[string]string) (string, error)
- func ImageID(t *testing.T, repoName string) string
- func PullImageWithAuth(dockerCli client.CommonAPIClient, ref, registryAuth string) error
- func PushImage(dockerCli client.CommonAPIClient, ref string, ...) error
- func RandString(n int) string
- func RecursiveCopy(t *testing.T, src, dst string)
- func RecursiveCopyNow(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.CommonAPIClient, id string, ...) 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 AssertOnNestedTar(nestedEntryPath string, assertions ...TarEntryAssertion) TarEntryAssertion
- func ContentContains(expected string) TarEntryAssertion
- func ContentEquals(expected string) TarEntryAssertion
- func DoesNotHaveModTime(expectedTime time.Time) TarEntryAssertion
- func HasFileMode(expectedMode int64) TarEntryAssertion
- func HasModTime(expectedTime time.Time) TarEntryAssertion
- func HasOwnerAndGroup(expectedUID int, expectedGID int) TarEntryAssertion
- func IsDirectory() TarEntryAssertion
- func IsGzipped() TarEntryAssertion
- func IsJSON() 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 ¶
AssertContainsMatch matches on content by regular expression
func AssertFalse ¶
func AssertIncludeAllExpectedPatterns ¶ added in v0.10.0
func AssertNotContains ¶
func AssertNotContainsMatch ¶
func AssertNotNil ¶
func AssertOnTarEntry ¶
func AssertOnTarEntry(t *testing.T, tarPath, entryPath string, assertFns ...TarEntryAssertion)
func AssertSameInstance ¶
Assert the simplistic pointer (or literal value) equality
func AssertSliceContains ¶
func AssertSliceContainsMatch ¶ added in v0.10.0
func AssertSliceContainsOnly ¶
func AssertSliceNotContains ¶ added in v0.11.0
func AssertTarball ¶ added in v0.10.0
func AssertTrue ¶
func AssertUnique ¶
func CreateImage ¶
func CreateImage(t *testing.T, dockerCli client.CommonAPIClient, repoName, dockerFile string)
func CreateImageFromDir ¶
func CreateImageOnRemote ¶
func CreateImageOnRemote(t *testing.T, dockerCli client.CommonAPIClient, registryConfig *TestRegistryConfig, repoName, dockerFile string) string
func Eventually ¶
func PullImageWithAuth ¶
func PullImageWithAuth(dockerCli client.CommonAPIClient, ref, registryAuth string) error
func PushImage ¶
func PushImage(dockerCli client.CommonAPIClient, ref string, registryConfig *TestRegistryConfig) error
func RandString ¶
func RecursiveCopy ¶
func RecursiveCopyNow ¶ added in v0.11.0
func RequireDocker ¶
func RunContainer ¶
Types ¶
type TarEntryAssertion ¶
func AssertOnNestedTar ¶ added in v0.10.0
func AssertOnNestedTar(nestedEntryPath string, assertions ...TarEntryAssertion) TarEntryAssertion
func ContentContains ¶ added in v0.10.0
func ContentContains(expected string) TarEntryAssertion
func ContentEquals ¶
func ContentEquals(expected string) TarEntryAssertion
func DoesNotHaveModTime ¶ added in v0.9.0
func DoesNotHaveModTime(expectedTime time.Time) TarEntryAssertion
func HasFileMode ¶
func HasFileMode(expectedMode int64) TarEntryAssertion
func HasModTime ¶
func HasModTime(expectedTime time.Time) TarEntryAssertion
func HasOwnerAndGroup ¶
func HasOwnerAndGroup(expectedUID int, expectedGID int) TarEntryAssertion
func IsDirectory ¶
func IsDirectory() TarEntryAssertion
func IsGzipped ¶ added in v0.10.0
func IsGzipped() TarEntryAssertion
func IsJSON ¶ added in v0.10.0
func IsJSON() TarEntryAssertion
func SymlinksTo ¶
func SymlinksTo(expectedTarget string) TarEntryAssertion
type TestRegistryConfig ¶
type TestRegistryConfig struct { RunRegistryPort string DockerConfigDir string // contains filtered or unexported fields }
func RunRegistry ¶
func RunRegistry(t *testing.T) *TestRegistryConfig
func (*TestRegistryConfig) AuthConfig ¶
func (rc *TestRegistryConfig) AuthConfig() dockertypes.AuthConfig
func (*TestRegistryConfig) Login ¶
func (rc *TestRegistryConfig) Login(t *testing.T, username string, password string)
func (*TestRegistryConfig) RegistryAuth ¶
func (rc *TestRegistryConfig) RegistryAuth() string
func (*TestRegistryConfig) RegistryCatalog ¶
func (rc *TestRegistryConfig) RegistryCatalog() (string, error)
func (*TestRegistryConfig) RepoName ¶
func (rc *TestRegistryConfig) RepoName(name string) string
func (*TestRegistryConfig) StopRegistry ¶
func (rc *TestRegistryConfig) StopRegistry(t *testing.T)
Click to show internal directories.
Click to hide internal directories.