Documentation ¶
Index ¶
- Constants
- func InitDriverImpl(driver string) func(DriverConfig) (Driver, error)
- func ResetEnvVars(t *testing.T, vars []unversioned.EnvVar)
- func SetEnvVars(t *testing.T, vars []unversioned.EnvVar) []unversioned.EnvVar
- type DockerDriver
- func (d *DockerDriver) Destroy(t *testing.T)
- func (d *DockerDriver) GetConfig(t *testing.T) (unversioned.Config, error)
- func (d *DockerDriver) ProcessCommand(t *testing.T, envVars []unversioned.EnvVar, fullCommand []string) (string, string, int)
- func (d *DockerDriver) ReadDir(t *testing.T, target string) ([]os.FileInfo, error)
- func (d *DockerDriver) ReadFile(t *testing.T, target string) ([]byte, error)
- func (d *DockerDriver) Setup(t *testing.T, envVars []unversioned.EnvVar, fullCommands [][]string)
- func (d *DockerDriver) StatFile(t *testing.T, target string) (os.FileInfo, error)
- func (d *DockerDriver) Teardown(t *testing.T, envVars []unversioned.EnvVar, fullCommands [][]string)
- type Driver
- type DriverConfig
- type HostDriver
- func (d *HostDriver) Destroy(t *testing.T)
- func (d *HostDriver) GetConfig(t *testing.T) (unversioned.Config, error)
- func (d *HostDriver) ProcessCommand(t *testing.T, envVars []unversioned.EnvVar, fullCommand []string) (string, string, int)
- func (d *HostDriver) ReadDir(t *testing.T, path string) ([]os.FileInfo, error)
- func (d *HostDriver) ReadFile(t *testing.T, path string) ([]byte, error)
- func (d *HostDriver) Setup(t *testing.T, envVars []unversioned.EnvVar, fullCommands [][]string)
- func (d *HostDriver) StatFile(t *testing.T, path string) (os.FileInfo, error)
- func (d *HostDriver) Teardown(t *testing.T, envVars []unversioned.EnvVar, fullCommands [][]string)
- type TarDriver
- func (d *TarDriver) Destroy(t *testing.T)
- func (d *TarDriver) GetConfig(t *testing.T) (unversioned.Config, error)
- func (d *TarDriver) ProcessCommand(t *testing.T, envVars []unversioned.EnvVar, fullCommand []string) (string, string, int)
- func (d *TarDriver) ReadDir(t *testing.T, path string) ([]os.FileInfo, error)
- func (d *TarDriver) ReadFile(t *testing.T, path string) ([]byte, error)
- func (d *TarDriver) Setup(t *testing.T, envVars []unversioned.EnvVar, fullCommand [][]string)
- func (d *TarDriver) StatFile(t *testing.T, path string) (os.FileInfo, error)
- func (d *TarDriver) Teardown(t *testing.T, envVars []unversioned.EnvVar, fullCommands [][]string)
Constants ¶
View Source
const ( Docker = "docker" Tar = "tar" Host = "host" )
Variables ¶
This section is empty.
Functions ¶
func InitDriverImpl ¶
func InitDriverImpl(driver string) func(DriverConfig) (Driver, error)
func ResetEnvVars ¶ added in v0.2.0
func ResetEnvVars(t *testing.T, vars []unversioned.EnvVar)
func SetEnvVars ¶ added in v0.2.0
func SetEnvVars(t *testing.T, vars []unversioned.EnvVar) []unversioned.EnvVar
given a list of environment variable key/value pairs, set these in the current environment. also, keep track of the previous values of these vars to reset after test execution.
Types ¶
type DockerDriver ¶
type DockerDriver struct {
// contains filtered or unexported fields
}
func (*DockerDriver) Destroy ¶
func (d *DockerDriver) Destroy(t *testing.T)
func (*DockerDriver) GetConfig ¶
func (d *DockerDriver) GetConfig(t *testing.T) (unversioned.Config, error)
func (*DockerDriver) ProcessCommand ¶
func (d *DockerDriver) ProcessCommand(t *testing.T, envVars []unversioned.EnvVar, fullCommand []string) (string, string, int)
func (*DockerDriver) Setup ¶
func (d *DockerDriver) Setup(t *testing.T, envVars []unversioned.EnvVar, fullCommands [][]string)
func (*DockerDriver) Teardown ¶ added in v0.2.0
func (d *DockerDriver) Teardown(t *testing.T, envVars []unversioned.EnvVar, fullCommands [][]string)
type Driver ¶
type Driver interface { Setup(t *testing.T, envVars []unversioned.EnvVar, fullCommands [][]string) // Teardown is optional and is only used in the host driver Teardown(t *testing.T, envVars []unversioned.EnvVar, fullCommands [][]string) // given an array of command parts, construct a full command and execute it against the // current environment. a list of environment variables can be passed to be set in the // environment before the command is executed. additionally, a boolean flag is passed // to specify whether or not we care about the output of the command. ProcessCommand(t *testing.T, envVars []unversioned.EnvVar, fullCommand []string) (string, string, int) StatFile(t *testing.T, path string) (os.FileInfo, error) ReadFile(t *testing.T, path string) ([]byte, error) ReadDir(t *testing.T, path string) ([]os.FileInfo, error) GetConfig(t *testing.T) (unversioned.Config, error) Destroy(t *testing.T) }
func NewDockerDriver ¶
func NewDockerDriver(args DriverConfig) (Driver, error)
func NewHostDriver ¶ added in v0.2.0
func NewHostDriver(args DriverConfig) (Driver, error)
func NewTarDriver ¶
func NewTarDriver(args DriverConfig) (Driver, error)
type DriverConfig ¶ added in v0.2.0
type HostDriver ¶ added in v0.2.0
type HostDriver struct { ConfigPath string // path to image metadata config on host fs GlobalVars []unversioned.EnvVar }
func (*HostDriver) Destroy ¶ added in v0.2.0
func (d *HostDriver) Destroy(t *testing.T)
func (*HostDriver) GetConfig ¶ added in v0.2.0
func (d *HostDriver) GetConfig(t *testing.T) (unversioned.Config, error)
func (*HostDriver) ProcessCommand ¶ added in v0.2.0
func (d *HostDriver) ProcessCommand(t *testing.T, envVars []unversioned.EnvVar, fullCommand []string) (string, string, int)
func (*HostDriver) Setup ¶ added in v0.2.0
func (d *HostDriver) Setup(t *testing.T, envVars []unversioned.EnvVar, fullCommands [][]string)
func (*HostDriver) Teardown ¶ added in v0.2.0
func (d *HostDriver) Teardown(t *testing.T, envVars []unversioned.EnvVar, fullCommands [][]string)
Click to show internal directories.
Click to hide internal directories.