e2e

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

README

Bootkube E2E Testing

This is the beginnings of E2E testing for the bootkube repo using the standard go testing harness. To run the tests once you have a kubeconfig to a running cluster just execute: go test -v ./e2e/ --kubeconfig=<filepath>

The number of nodes is required so that the setup can block on all nodes being registered.

Roadmap

Implement whatever is needed to finish porting all functionality from pluton tests

Documentation

Index

Constants

View Source
const (
	LabelNodeRoleMaster = "node-role.kubernetes.io/master"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	Masters []*Node
	Workers []*Node
}

Cluster is a simple abstraction to make writing tests easier.

func GetCluster

func GetCluster() (*Cluster, error)

GetCluster can be called in every test to return a *Cluster object.

type Node

type Node struct {
	*v1.Node
}

func (*Node) ExternalIP

func (n *Node) ExternalIP() string

func (*Node) GetIPByType added in v0.6.1

func (n *Node) GetIPByType(addrType v1.NodeAddressType) string

func (*Node) InternalIP added in v0.6.1

func (n *Node) InternalIP() string

func (*Node) IsMaster

func (n *Node) IsMaster() bool

IsMaster returns true if the node's labels contains "node-role.kubernetes.io/master".

func (*Node) Reboot

func (n *Node) Reboot() error

func (*Node) SSH

func (n *Node) SSH(cmd string) (stdout, stderr []byte, err error)

type SSHClient

type SSHClient struct {
	*ssh.ClientConfig
}

func (*SSHClient) Manhole added in v0.5.0

func (c *SSHClient) Manhole(host string) error

Manhole connects os.Stdin, os.Stdout, and os.Stderr to an interactive shell session on the Machine m. Manhole blocks until the shell session has ended. If os.Stdin does not refer to a TTY, Manhole returns immediately with a nil error. Copied from github.com/coreos/mantle/platform/util.go

func (*SSHClient) SSH

func (c *SSHClient) SSH(host, cmd string) (stdout, stderr []byte, err error)

Jump to

Keyboard shortcuts

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