cluster

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2018 License: Apache-2.0 Imports: 7 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestCluster

type TestCluster struct {
	*harness.H
	platform.Cluster
	NativeFuncs []string
}

TestCluster embedds a Cluster to provide platform independant helper methods.

func (*TestCluster) DropFile

func (t *TestCluster) DropFile(localPath string) error

DropFile places file from localPath to ~/ on every machine in cluster

func (*TestCluster) ListNativeFunctions

func (t *TestCluster) ListNativeFunctions() []string

ListNativeFunctions returns a slice of function names that can be executed directly on machines in the cluster.

func (*TestCluster) MustSSH added in v0.8.0

func (t *TestCluster) MustSSH(m platform.Machine, cmd string) []byte

MustSSH runs a ssh command on the given machine in the cluster, writes its stderr to the test's output as a 'Log' line, fails the test if the command is unsuccessful, and returns the command's stdout.

func (*TestCluster) Run added in v0.5.0

func (t *TestCluster) Run(name string, f func(c TestCluster)) bool

Run runs f as a subtest and reports whether f succeeded.

func (*TestCluster) RunNative

func (t *TestCluster) RunNative(funcName string, m platform.Machine) bool

RunNative runs a registered NativeFunc on a remote machine

func (*TestCluster) SSH added in v0.8.0

func (t *TestCluster) SSH(m platform.Machine, cmd string) ([]byte, error)

SSH runs a ssh command on the given machine in the cluster. It differs from Machine.SSH in that stderr is written to the test's output as a 'Log' line. This ensures the output will be correctly accumulated under the correct test.

Jump to

Keyboard shortcuts

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