acceptance

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2017 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BidirectionalPartitionNemesis

func BidirectionalPartitionNemesis(
	ctx context.Context, t *testing.T, c cluster.Cluster, stopper *stop.Stopper,
)

BidirectionalPartitionNemesis is a nemesis which randomly severs the network symmetrically between two random groups of nodes. Partitioned and connected mode take alternating turns, with random durations of up to 15s.

func CheckGossip

func CheckGossip(
	ctx context.Context, t testing.TB, c cluster.Cluster, d time.Duration, f CheckGossipFunc,
)

CheckGossip fetches the gossip infoStore from each node and invokes the given function. The test passes if the function returns 0 for every node, retrying for up to the given duration.

func GetStopper

func GetStopper() *stop.Stopper

GetStopper returns the stopper used by acceptance tests.

func MainTest

func MainTest(m *testing.M)

MainTest is an exported implementation of TestMain for use by other packages.

func MakeFarmer

func MakeFarmer(t testing.TB, prefix string, stopper *stop.Stopper) *terrafarm.Farmer

MakeFarmer creates a terrafarm farmer for use in acceptance tests.

func RunTests

func RunTests(m *testing.M)

RunTests runs the tests in a package while gracefully handling interrupts.

func SkipUnlessLocal

func SkipUnlessLocal(t testing.TB)

SkipUnlessLocal calls t.Skip if not running against a local cluster.

func SkipUnlessPrivileged

func SkipUnlessPrivileged(t testing.TB)

SkipUnlessPrivileged calls t.Skip if not running with the privileged flag.

func SkipUnlessRemote

func SkipUnlessRemote(t testing.TB)

SkipUnlessRemote calls t.Skip if not running against a remote cluster.

func StartCluster

func StartCluster(ctx context.Context, t *testing.T, cfg cluster.TestConfig) (c cluster.Cluster)

StartCluster starts a cluster from the relevant flags. All test clusters should be created through this command since it sets up the logging in a unified way.

Types

type CheckGossipFunc

type CheckGossipFunc func(map[string]gossip.Info) error

CheckGossipFunc is the type of callback used in CheckGossip.

func HasPeers

func HasPeers(expected int) CheckGossipFunc

HasPeers returns a CheckGossipFunc that passes when the given number of peers are connected via gossip.

type NemesisFn

type NemesisFn func(ctx context.Context, t *testing.T, c cluster.Cluster, stopper *stop.Stopper)

A NemesisFn runs a nemesis on the given cluster, shutting down in a timely manner when the stop channel is closed.

Directories

Path Synopsis
Package cluster is a generated protocol buffer package.
Package cluster is a generated protocol buffer package.
compose
gss/psql Module

Jump to

Keyboard shortcuts

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