Documentation
¶
Index ¶
- func CheckOutput(t *testing.T, tt CommandTest, stdout string, stderr string, exitCode int)
- type CommandTest
- type FileContentTest
- type FileExistenceTest
- type LicenseTest
- type MetadataTest
- type StructureTest
- func (st *StructureTest) NewDriver() (drivers.Driver, error)
- func (st *StructureTest) RunAll(t *testing.T) int
- func (st *StructureTest) RunCommandTests(t *testing.T) int
- func (st *StructureTest) RunFileContentTests(t *testing.T) int
- func (st *StructureTest) RunFileExistenceTests(t *testing.T) int
- func (st *StructureTest) RunLicenseTests(t *testing.T) int
- func (st *StructureTest) RunMetadataTests(t *testing.T) int
- func (st *StructureTest) SetDriverImpl(f func(drivers.DriverConfig) (drivers.Driver, error), ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckOutput ¶
Types ¶
type CommandTest ¶
type CommandTest struct { Name string `yaml:"name"` Setup [][]string `yaml:"setup"` Teardown [][]string `yaml:"teardown"` EnvVars []unversioned.EnvVar `yaml:"envVars"` ExitCode int `yaml:"exitCode"` Command string `yaml:"command"` Args []string `yaml:"args"` ExpectedOutput []string `yaml:"expectedOutput"` ExcludedOutput []string `yaml:"excludedOutput"` ExpectedError []string `yaml:"expectedError"` ExcludedError []string `yaml:"excludedError" ` // excluded error from running command }
func (CommandTest) LogName ¶
func (ct CommandTest) LogName() string
type FileContentTest ¶
type FileContentTest struct { Name string `yaml:"name"` // name of test Path string `yaml:"path"` // file to check existence of ExpectedContents []string `yaml:"expectedContents"` // list of expected contents of file ExcludedContents []string `yaml:"excludedContents"` // list of excluded contents of file }
func (FileContentTest) LogName ¶
func (ft FileContentTest) LogName() string
type FileExistenceTest ¶
type FileExistenceTest struct { Name string `yaml:"name"` // name of test Path string `yaml:"path"` // file to check existence of ShouldExist bool `yaml:"shouldExist"` // whether or not the file should exist Permissions string `yaml:"permissions"` // expected Unix permission string of the file, e.g. drwxrwxrwx }
func (FileExistenceTest) LogName ¶
func (ft FileExistenceTest) LogName() string
type LicenseTest ¶
Not currently used, but leaving the possibility open
func (LicenseTest) LogName ¶
func (lt LicenseTest) LogName(num int) string
type MetadataTest ¶
type MetadataTest struct { Env []unversioned.EnvVar `yaml:"env"` ExposedPorts []string `yaml:"exposedPorts"` Entrypoint *[]string `yaml:"entrypoint"` Cmd *[]string `yaml:"cmd"` Workdir string `yaml:"workdir"` Volumes []string `yaml:"volumes"` }
func (MetadataTest) LogName ¶
func (mt MetadataTest) LogName() string
type StructureTest ¶
type StructureTest struct { DriverImpl func(drivers.DriverConfig) (drivers.Driver, error) DriverArgs drivers.DriverConfig GlobalEnvVars []unversioned.EnvVar `yaml:"globalEnvVars"` CommandTests []CommandTest `yaml:"commandTests"` FileExistenceTests []FileExistenceTest `yaml:"fileExistenceTests"` FileContentTests []FileContentTest `yaml:"fileContentTests"` MetadataTest MetadataTest `yaml:"metadataTest"` LicenseTests []LicenseTest `yaml:"licenseTests"` }
func (*StructureTest) RunCommandTests ¶
func (st *StructureTest) RunCommandTests(t *testing.T) int
func (*StructureTest) RunFileContentTests ¶
func (st *StructureTest) RunFileContentTests(t *testing.T) int
func (*StructureTest) RunFileExistenceTests ¶
func (st *StructureTest) RunFileExistenceTests(t *testing.T) int
func (*StructureTest) RunLicenseTests ¶
func (st *StructureTest) RunLicenseTests(t *testing.T) int
func (*StructureTest) RunMetadataTests ¶
func (st *StructureTest) RunMetadataTests(t *testing.T) int
func (*StructureTest) SetDriverImpl ¶
func (st *StructureTest) SetDriverImpl(f func(drivers.DriverConfig) (drivers.Driver, error), args drivers.DriverConfig)
Click to show internal directories.
Click to hide internal directories.