Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSSHClient ¶
GetSSHClient - utility function to get an ssh client from the host, port, and clientconfig passed into the function
Types ¶
type Host ¶
type Host struct { IP string `hcl:"ip"` Port string `hcl:"port,optional"` User string `hcl:"user,optional"` }
Host - struct to hold host information
type HostHCLUtil ¶
type HostHCLUtil struct {
Hosts []Host `hcl:"host,block"`
}
HostHCLUtil - struct to hold host info read from a hosts HCL file
type RunBlock ¶
type RunBlock struct { Cmd []*resources.Command `hcl:"command,block"` Os *resources.OS `hcl:"os,block"` }
RunBlock is a struct to hold the data of a run block of a test
type Test ¶
type Test struct { Title string `hcl:"title,attr"` Cmds []*resources.Command `hcl:"command,block"` Os *resources.OS `hcl:"os,block"` }
Test - struct to hold test information
type UnitTestHCLUtil ¶
type UnitTestHCLUtil struct {
UnitTests []UnitTestUtil `hcl:"unittest,block"`
}
UnitTestHCLUtil - Structure to hold info about unit tests
type UnitTestUtil ¶
type UnitTestUtil struct { Name string `hcl:"name,label"` Image string `hcl:"image"` Port string `hcl:"port"` ContainerName string `hcl:"containerName"` Run RunBlock `hcl:"run,block"` ContainerID string }
UnitTestUtil is a struct to hold our test data.
func NewUnitTestUtil ¶
func NewUnitTestUtil(name string, image string, port string, containerName string) *UnitTestUtil
NewUnitTestUtil Returns a new UnitTestUtil
func (*UnitTestUtil) GetImage ¶
func (test *UnitTestUtil) GetImage() error
GetImage will get the specified image for the test
func (*UnitTestUtil) RemoveContainer ¶
func (test *UnitTestUtil) RemoveContainer() error
RemoveContainer - Function to remove a Docker Container
func (*UnitTestUtil) RemoveImage ¶
func (test *UnitTestUtil) RemoveImage() error
RemoveImage - Function to remove a Docker Image from the system
func (*UnitTestUtil) RunImage ¶
func (test *UnitTestUtil) RunImage() error
RunImage runs the pulled test image in a container
func (*UnitTestUtil) SSHDRunning ¶
func (test *UnitTestUtil) SSHDRunning() (bool, error)
SSHDRunning - Function to check if the container has the SSHD service running
func (*UnitTestUtil) StopContainer ¶
func (test *UnitTestUtil) StopContainer() error
StopContainer - Function to stop a test container