Documentation ¶
Index ¶
- func BidirectionalPartitionNemesis(ctx context.Context, t *testing.T, c cluster.Cluster, stopper *stop.Stopper)
- func CheckGossip(ctx context.Context, t testing.TB, c cluster.Cluster, d time.Duration, ...)
- func MakeFarmer(t testing.TB, prefix string, stopper *stop.Stopper) *terrafarm.Farmer
- func RunTests(m *testing.M)
- func SkipUnlessLocal(t testing.TB)
- func SkipUnlessPrivileged(t testing.TB)
- func SkipUnlessRemote(t testing.TB)
- func StartCluster(ctx context.Context, t *testing.T, cfg cluster.TestConfig) (c cluster.Cluster)
- type CheckGossipFunc
- type NemesisFn
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 MakeFarmer ¶
MakeFarmer creates a terrafarm farmer for use in acceptance tests.
func SkipUnlessLocal ¶
SkipUnlessLocal calls t.Skip if not running against a local cluster.
func SkipUnlessPrivileged ¶
SkipUnlessPrivileged calls t.Skip if not running with the privileged flag.
func SkipUnlessRemote ¶
SkipUnlessRemote calls t.Skip if not running against a remote cluster.
func StartCluster ¶
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 ¶
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.