Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dind ¶
type Dind struct {
// contains filtered or unexported fields
}
Dind implements docker-in-docker(dind) based testbed
func (*Dind) GetNodes ¶
func (v *Dind) GetNodes() []TestbedNode
GetNodes returns the nodes in a dind setup
type DindNode ¶
DindNode implements a node in docker-in-docker (dind) testbed
func (DindNode) RunCommand ¶
RunCommand runs a shell command in a dind node and returns it's exit status
func (DindNode) RunCommandBackground ¶
RunCommandBackground runs a background command in a dind node
type TestCommand ¶
TestCommand is a command that is run on a test node
func (*TestCommand) Run ¶
func (c *TestCommand) Run(cmd string, args ...string) error
Run runs a command and return it's exit status
func (*TestCommand) RunWithOutput ¶
func (c *TestCommand) RunWithOutput(cmd string, args ...string) ([]byte, error)
RunWithOutput runs a command and return it's exit status and output
type Testbed ¶
type Testbed interface { Setup(start bool, env string, numNodes int) error Teardown() GetNodes() []TestbedNode }
Testbed is a collection of test nodes
type TestbedNode ¶
type TestbedNode interface { RunCommand(cmd string) (err error) RunCommandWithOutput(cmd string) (output string, err error) RunCommandBackground(cmd string) (output string, err error) GetName() string }
TestbedNode is a node under test
type Vagrant ¶
type Vagrant struct {
// contains filtered or unexported fields
}
Vagrant implements a vagrant based testbed
func (*Vagrant) GetNodes ¶
func (v *Vagrant) GetNodes() []TestbedNode
GetNodes returns the nodes in a vagrant setup
type VagrantCommand ¶
VagrantCommand is a command that is run on a vagrant node
func (*VagrantCommand) Run ¶
func (c *VagrantCommand) Run(cmd string, args ...string) error
Run runs a command and return it's exit status
func (*VagrantCommand) RunWithOutput ¶
func (c *VagrantCommand) RunWithOutput(cmd string, args ...string) ([]byte, error)
RunWithOutput runs a command and return it's exit status and output
type VagrantNode ¶
type VagrantNode struct { Name string // contains filtered or unexported fields }
VagrantNode implements a node in vagrant testbed
func NewVagrantNode ¶
func NewVagrantNode(name, port, privKeyFile string) (*VagrantNode, error)
NewVagrantNode intializes a node in vagrant testbed
func (*VagrantNode) Cleanup ¶
func (n *VagrantNode) Cleanup()
Cleanup clears the ssh client resources
func (*VagrantNode) GetName ¶
func (n *VagrantNode) GetName() string
GetName returns vagrant node's name
func (*VagrantNode) RunCommand ¶
func (n *VagrantNode) RunCommand(cmd string) error
RunCommand runs a shell command in a vagrant node and returns it's exit status
func (*VagrantNode) RunCommandBackground ¶
func (n *VagrantNode) RunCommandBackground(cmd string) (string, error)
RunCommandBackground runs a background command in a vagrant node
func (*VagrantNode) RunCommandWithOutput ¶
func (n *VagrantNode) RunCommandWithOutput(cmd string) (string, error)
RunCommandWithOutput runs a shell command in a vagrant node and returns it's exit status and output