Documentation ¶
Index ¶
- type CommandTest
- type FileContentTest
- type FileExistenceTest
- func (ft FileExistenceTest) LogName() string
- func (fe FileExistenceTest) MarshalYAML() (interface{}, error)
- func (ft FileExistenceTest) Run(driver drivers.Driver) *types.TestResult
- func (fe *FileExistenceTest) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (ft FileExistenceTest) Validate(channel chan interface{}) bool
- type LicenseTest
- type MetadataTest
- type StructureTest
- func (st *StructureTest) NewDriver() (drivers.Driver, error)
- func (st *StructureTest) RunAll(channel chan interface{}, file string)
- func (st *StructureTest) RunCommandTests(channel chan interface{})
- func (st *StructureTest) RunFileContentTests(channel chan interface{})
- func (st *StructureTest) RunFileExistenceTests(channel chan interface{})
- func (st *StructureTest) RunLicenseTests(channel chan interface{})
- func (st *StructureTest) RunMetadataTests(channel chan interface{})
- func (st *StructureTest) SetDriverImpl(f func(drivers.DriverConfig) (drivers.Driver, error), ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandTest ¶
type CommandTest struct { Name string `yaml:"name"` Setup [][]string `yaml:"setup"` Teardown [][]string `yaml:"teardown"` EnvVars []types.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) CheckOutput ¶
func (ct *CommandTest) CheckOutput(result *types.TestResult, stdout string, stderr string, exitCode int)
func (*CommandTest) LogName ¶
func (ct *CommandTest) LogName() string
func (*CommandTest) Run ¶
func (ct *CommandTest) Run(driver drivers.Driver) *types.TestResult
func (*CommandTest) Validate ¶
func (ct *CommandTest) Validate(channel chan interface{}) bool
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
func (FileContentTest) Run ¶
func (ft FileContentTest) Run(driver drivers.Driver) *types.TestResult
func (FileContentTest) Validate ¶
func (ft FileContentTest) Validate(channel chan interface{}) bool
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 Uid int `yaml:"uid"` // ID of the owner of the file Gid int `yaml:"gid"` // ID of the group of the file IsExecutableBy string `yaml:"isExecutableBy"` // name of group that file should be executable by }
func (FileExistenceTest) LogName ¶
func (ft FileExistenceTest) LogName() string
func (FileExistenceTest) MarshalYAML ¶ added in v1.2.2
func (fe FileExistenceTest) MarshalYAML() (interface{}, error)
func (FileExistenceTest) Run ¶
func (ft FileExistenceTest) Run(driver drivers.Driver) *types.TestResult
func (*FileExistenceTest) UnmarshalYAML ¶ added in v1.2.2
func (fe *FileExistenceTest) UnmarshalYAML(unmarshal func(interface{}) error) error
func (FileExistenceTest) Validate ¶
func (ft FileExistenceTest) Validate(channel chan interface{}) bool
type LicenseTest ¶
Not currently used, but leaving the possibility open
func (LicenseTest) LogName ¶
func (lt LicenseTest) LogName() string
func (LicenseTest) Run ¶
func (lt LicenseTest) Run(driver drivers.Driver) *types.TestResult
type MetadataTest ¶
type MetadataTest struct { EnvVars []types.EnvVar `yaml:"envVars"` UnboundEnvVars []types.EnvVar `yaml:"unboundEnvVars"` ExposedPorts []string `yaml:"exposedPorts"` UnexposedPorts []string `yaml:"unexposedPorts"` Entrypoint *[]string `yaml:"entrypoint"` Cmd *[]string `yaml:"cmd"` Workdir string `yaml:"workdir"` Volumes []string `yaml:"volumes"` UnmountedVolumes []string `yaml:"unmountedVolumes"` Labels []types.Label `yaml:"labels"` User string `yaml:"user"` }
func (MetadataTest) IsEmpty ¶ added in v1.2.0
func (mt MetadataTest) IsEmpty() bool
func (MetadataTest) LogName ¶
func (mt MetadataTest) LogName() string
func (MetadataTest) Run ¶
func (mt MetadataTest) Run(driver drivers.Driver) *types.TestResult
func (MetadataTest) Validate ¶ added in v1.1.0
func (mt MetadataTest) Validate(channel chan interface{}) bool
type StructureTest ¶
type StructureTest struct { DriverImpl func(drivers.DriverConfig) (drivers.Driver, error) DriverArgs drivers.DriverConfig SchemaVersion string `yaml:"schemaVersion"` GlobalEnvVars []types.EnvVar `yaml:"globalEnvVars"` CommandTests []CommandTest `yaml:"commandTests"` FileExistenceTests []FileExistenceTest `yaml:"fileExistenceTests"` FileContentTests []FileContentTest `yaml:"fileContentTests"` MetadataTest MetadataTest `yaml:"metadataTest"` LicenseTests []LicenseTest `yaml:"licenseTests"` ContainerRunOptions types.ContainerRunOptions `yaml:"containerRunOptions"` }
func (*StructureTest) RunAll ¶
func (st *StructureTest) RunAll(channel chan interface{}, file string)
func (*StructureTest) RunCommandTests ¶
func (st *StructureTest) RunCommandTests(channel chan interface{})
func (*StructureTest) RunFileContentTests ¶
func (st *StructureTest) RunFileContentTests(channel chan interface{})
func (*StructureTest) RunFileExistenceTests ¶
func (st *StructureTest) RunFileExistenceTests(channel chan interface{})
func (*StructureTest) RunLicenseTests ¶
func (st *StructureTest) RunLicenseTests(channel chan interface{})
func (*StructureTest) RunMetadataTests ¶
func (st *StructureTest) RunMetadataTests(channel chan interface{})
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.