acceptance

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2018 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckGossip

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

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 EphemeralStorageAccount added in v1.1.0

func EphemeralStorageAccount() string

EphemeralStorageAccount returns the name of the storage account to use to store data that should be periodically purged. It returns a storage account in the region specified by the -tf.storage-location flag to avoid bandwidth egress charges.

See /docs/CLOUD-RESOURCES.md for details.

func FixtureStorageAccount added in v1.1.0

func FixtureStorageAccount() string

FixtureStorageAccount returns the name of the storage account that contains permanent test data ("test fixtures"). It returns a storage account in the region specified by the -tf.storage-location flag to avoid bandwidth egress charges.

See /docs/CLOUD-RESOURCES.md for details.

func FixtureURL added in v1.1.0

func FixtureURL(name string) string

FixtureURL returns the public URL at which the fixture with the given name can be downloaded from Azure Cloud Storage. Like FixtureStorageAccount(), it takes the -tf.storage-location flag into account.

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 RunDocker added in v1.1.0

func RunDocker(t *testing.T, testee func(t *testing.T))

RunDocker runs the given acceptance test using a Docker cluster.

func RunLocal added in v1.1.0

func RunLocal(t *testing.T, testee func(t *testing.T))

RunLocal runs the given acceptance test using a bare cluster.

func RunTerraform added in v1.1.0

func RunTerraform(t *testing.T, testee func(t *testing.T))

RunTerraform runs the given acceptance test using a terraform cluster.

func RunTests

func RunTests(m *testing.M)

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

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.

Directories

Path Synopsis
Package cluster is a generated protocol buffer package.
Package cluster is a generated protocol buffer package.
tc
Package tc contains utility methods for using the Linux tc (traffic control) command to mess with the network links between cockroach nodes running on the local machine.
Package tc contains utility methods for using the Linux tc (traffic control) command to mess with the network links between cockroach nodes running on the local machine.

Jump to

Keyboard shortcuts

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