e2e

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: May 19, 2017 License: Apache-2.0 Imports: 10 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 --kubeconfig=<filepath> ./e2e/

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

Requirements

Tests can't rely on network access to the cluster except via the kubernetes api. So no hitting nodes directly just because you can. This will maximize future portability with other setup tools.

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func InitSSHClient

func InitSSHClient(keypath string)

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