v1

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckOutput

func CheckOutput(t *testing.T, tt CommandTest, stdout string, stderr string, exitCode int)

Types

type CommandTest

type CommandTest struct {
	Name           string
	Setup          []unversioned.Command
	EnvVars        []unversioned.EnvVar
	ExitCode       int
	Command        []string
	ExpectedOutput []string
	ExcludedOutput []string
	ExpectedError  []string
	ExcludedError  []string // excluded error from running command
}

func (CommandTest) LogName

func (ct CommandTest) LogName() string

type FileContentTest

type FileContentTest struct {
	Name             string   // name of test
	Path             string   // file to check existence of
	ExpectedContents []string // list of expected contents of file
	ExcludedContents []string // list of excluded contents of file
}

func (FileContentTest) LogName

func (ft FileContentTest) LogName() string

type FileExistenceTest

type FileExistenceTest struct {
	Name        string // name of test
	Path        string // file to check existence of
	ShouldExist bool   // whether or not the file should exist
	Permissions string // expected Unix permission string of the file, e.g. drwxrwxrwx
}

func (FileExistenceTest) LogName

func (ft FileExistenceTest) LogName() string

type LicenseTest

type LicenseTest struct {
	Debian bool
	Files  []string
}

Not currently used, but leaving the possibility open

func (LicenseTest) LogName

func (lt LicenseTest) LogName(num int) string

type StructureTest

type StructureTest struct {
	DriverImpl         func(string) (drivers.Driver, error)
	Image              string
	GlobalEnvVars      []unversioned.EnvVar
	CommandTests       []CommandTest
	FileExistenceTests []FileExistenceTest
	FileContentTests   []FileContentTest
	LicenseTests       []LicenseTest
}

func (*StructureTest) NewDriver

func (st *StructureTest) NewDriver() (drivers.Driver, error)

func (*StructureTest) RunAll

func (st *StructureTest) RunAll(t *testing.T) int

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) SetDriverImpl

func (st *StructureTest) SetDriverImpl(f func(string) (drivers.Driver, error), image string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL