Documentation ¶
Index ¶
- func AssertBuildpacksHaveDescriptors(t *testing.T, bps []dist.Buildpack, descriptors []dist.BuildpackDescriptor)
- func AssertContains(t *testing.T, actual, expected string)
- func AssertContainsAllInOrder(t *testing.T, actual bytes.Buffer, 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 AssertFunctionName(t *testing.T, fn interface{}, expected string)
- func AssertGitHeadEq(t *testing.T, path1, path2 string)
- 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 AssertNotEq(t *testing.T, actual, expected interface{})
- 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 AssertSliceContainsInOrder(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 AssertTarFileContents(t *testing.T, tarfile, path, expected string)
- func AssertTarHasFile(t *testing.T, tarFile, path 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 CopyFileE(src, dst string) error
- 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 CreateRegistryFixture(t *testing.T, tmpDir, fixturePath string) 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 DockerHostname(t *testing.T) 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 MockWriterAndOutput() (*color.Console, func() string)
- func PullImageWithAuth(dockerCli client.CommonAPIClient, ref, registryAuth string) error
- func PushImage(dockerCli client.CommonAPIClient, ref string, ...) error
- func RandString(n int) string
- func ReadPackConfig(t *testing.T) config.Config
- func RecursiveCopy(t *testing.T, src, dst string)
- func RecursiveCopyE(src, dst string) error
- func RecursiveCopyNow(t *testing.T, src, dst string)
- func RegistryHost(host, port string) 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 SkipUnless(t *testing.T, expression bool, reason string)
- func TopLayerDiffID(t *testing.T, repoName string) string
- type AssertionManager
- func (a AssertionManager) AssertTrimmedContains(actual, expected string)
- func (a AssertionManager) Contains(actual, expected string)
- func (a AssertionManager) ContainsAll(actual string, expected ...string)
- func (a AssertionManager) ContainsF(actual, expected string, formatArgs ...interface{})
- func (a AssertionManager) ContainsJSON(actualJSON, expectedJSON string)
- func (a AssertionManager) ContainsTOML(actualTOML, expectedTOML string)
- func (a AssertionManager) ContainsWithMessage(actual, expected, messageFormat string)
- func (a AssertionManager) ContainsYAML(actualYAML, expectedYAML string)
- func (a AssertionManager) Equal(actual, expected interface{})
- func (a AssertionManager) Error(actual error)
- func (a AssertionManager) ErrorContains(actual error, expected string)
- func (a AssertionManager) ErrorWithMessage(actual error, message string)
- func (a AssertionManager) ErrorWithMessageF(actual error, format string, args ...interface{})
- func (a AssertionManager) Fails(actual interface{})
- func (a AssertionManager) Matches(actual string, pattern *regexp.Regexp)
- func (a AssertionManager) MatchesAll(actual string, patterns ...*regexp.Regexp)
- func (a AssertionManager) Nil(actual interface{})
- func (a AssertionManager) NilWithMessage(actual interface{}, message string)
- func (a AssertionManager) NoMatches(actual string, pattern *regexp.Regexp)
- func (a AssertionManager) NotContainWithMessage(actual, expected, messageFormat string)
- func (a AssertionManager) NotContains(actual, expected string)
- func (a AssertionManager) NotEqual(actual, expected interface{})
- func (a AssertionManager) NotNil(actual interface{})
- func (a AssertionManager) Succeeds(actual interface{})
- func (a AssertionManager) TrimmedEq(actual, expected string)
- func (a AssertionManager) TrueWithMessage(actual bool, message 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 TarVerifier
- 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 AssertFunctionName ¶
func AssertGitHeadEq ¶
func AssertNotContains ¶
func AssertNotContainsMatch ¶
func AssertNotEq ¶
Assert deep equality (and provide useful difference as a test failure)
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 AssertSliceContainsOnly ¶
func AssertSliceNotContains ¶
func AssertTarFileContents ¶
func AssertTarHasFile ¶
func AssertTarball ¶
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 CreateRegistryFixture ¶
func DockerHostname ¶
func Eventually ¶
func MockWriterAndOutput ¶
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 RecursiveCopyE ¶
func RecursiveCopyNow ¶
func RegistryHost ¶
func RequireDocker ¶
func RunContainer ¶
Types ¶
type AssertionManager ¶
type AssertionManager struct {
// contains filtered or unexported fields
}
func NewAssertionManager ¶
func NewAssertionManager(testObject *testing.T) AssertionManager
func (AssertionManager) AssertTrimmedContains ¶
func (a AssertionManager) AssertTrimmedContains(actual, expected string)
func (AssertionManager) Contains ¶
func (a AssertionManager) Contains(actual, expected string)
func (AssertionManager) ContainsAll ¶
func (a AssertionManager) ContainsAll(actual string, expected ...string)
func (AssertionManager) ContainsF ¶
func (a AssertionManager) ContainsF(actual, expected string, formatArgs ...interface{})
func (AssertionManager) ContainsJSON ¶
func (a AssertionManager) ContainsJSON(actualJSON, expectedJSON string)
func (AssertionManager) ContainsTOML ¶
func (a AssertionManager) ContainsTOML(actualTOML, expectedTOML string)
func (AssertionManager) ContainsWithMessage ¶
func (a AssertionManager) ContainsWithMessage(actual, expected, messageFormat string)
ContainsWithMessage will fail if expected is not contained within actual, messageFormat will be printed as the failure message, with actual interpolated in the message
func (AssertionManager) ContainsYAML ¶
func (a AssertionManager) ContainsYAML(actualYAML, expectedYAML string)
func (AssertionManager) Equal ¶
func (a AssertionManager) Equal(actual, expected interface{})
func (AssertionManager) Error ¶
func (a AssertionManager) Error(actual error)
Error checks that the provided value is an error (non-nil)
func (AssertionManager) ErrorContains ¶
func (a AssertionManager) ErrorContains(actual error, expected string)
func (AssertionManager) ErrorWithMessage ¶
func (a AssertionManager) ErrorWithMessage(actual error, message string)
func (AssertionManager) ErrorWithMessageF ¶
func (a AssertionManager) ErrorWithMessageF(actual error, format string, args ...interface{})
func (AssertionManager) Fails ¶
func (a AssertionManager) Fails(actual interface{})
func (AssertionManager) Matches ¶
func (a AssertionManager) Matches(actual string, pattern *regexp.Regexp)
func (AssertionManager) MatchesAll ¶
func (a AssertionManager) MatchesAll(actual string, patterns ...*regexp.Regexp)
func (AssertionManager) Nil ¶
func (a AssertionManager) Nil(actual interface{})
func (AssertionManager) NilWithMessage ¶
func (a AssertionManager) NilWithMessage(actual interface{}, message string)
func (AssertionManager) NoMatches ¶
func (a AssertionManager) NoMatches(actual string, pattern *regexp.Regexp)
func (AssertionManager) NotContainWithMessage ¶
func (a AssertionManager) NotContainWithMessage(actual, expected, messageFormat string)
NotContainWithMessage will fail if expected is contained within actual, messageFormat will be printed as the failure message, with actual interpolated in the message
func (AssertionManager) NotContains ¶
func (a AssertionManager) NotContains(actual, expected string)
func (AssertionManager) NotEqual ¶
func (a AssertionManager) NotEqual(actual, expected interface{})
func (AssertionManager) NotNil ¶
func (a AssertionManager) NotNil(actual interface{})
func (AssertionManager) Succeeds ¶
func (a AssertionManager) Succeeds(actual interface{})
func (AssertionManager) TrimmedEq ¶
func (a AssertionManager) TrimmedEq(actual, expected string)
func (AssertionManager) TrueWithMessage ¶
func (a AssertionManager) TrueWithMessage(actual bool, message string)
type TarEntryAssertion ¶
func AssertOnNestedTar ¶
func AssertOnNestedTar(nestedEntryPath string, assertions ...TarEntryAssertion) TarEntryAssertion
func ContentContains ¶
func ContentContains(expected string) TarEntryAssertion
func ContentEquals ¶
func ContentEquals(expected string) TarEntryAssertion
func DoesNotHaveModTime ¶
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 ¶
func IsGzipped() TarEntryAssertion
func IsJSON ¶
func IsJSON() TarEntryAssertion
func SymlinksTo ¶
func SymlinksTo(expectedTarget string) TarEntryAssertion
type TarVerifier ¶
type TarVerifier struct {
// contains filtered or unexported fields
}
func NewTarVerifier ¶
func (*TarVerifier) NextDirectory ¶
func (v *TarVerifier) NextDirectory(name string, mode int64)
func (*TarVerifier) NextFile ¶
func (v *TarVerifier) NextFile(name, expectedFileContents string, expectedFileMode int64)
func (*TarVerifier) NextSymLink ¶
func (v *TarVerifier) NextSymLink(name, link string)
func (*TarVerifier) NoMoreFilesExist ¶
func (v *TarVerifier) NoMoreFilesExist()
type TestRegistryConfig ¶
type TestRegistryConfig struct { RunRegistryHost string 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)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.