testhelpers

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2019 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfClusterAndCore added in v1.1.0

func ConfClusterAndCore(t testing.T, conf *vault.CoreConfig, opts *vault.TestClusterOptions) (*vault.TestCluster, *vault.TestClusterCore)

func DeriveActiveCore added in v0.11.2

func DeriveActiveCore(t testing.T, cluster *vault.TestCluster) *vault.TestClusterCore

func EnsureCoreIsPerfStandby added in v1.0.3

func EnsureCoreIsPerfStandby(t testing.T, core *vault.TestClusterCore)

func EnsureCoreSealed added in v1.0.3

func EnsureCoreSealed(t testing.T, core *vault.TestClusterCore) error

func EnsureCoreUnsealed added in v1.0.3

func EnsureCoreUnsealed(t testing.T, c *vault.TestCluster, core *vault.TestClusterCore)

func EnsureCoresSealed added in v1.0.3

func EnsureCoresSealed(t testing.T, c *vault.TestCluster)

func EnsureCoresUnsealed added in v0.11.2

func EnsureCoresUnsealed(t testing.T, c *vault.TestCluster)

func GenerateRoot

func GenerateRoot(t testing.T, cluster *vault.TestCluster, drToken bool) string

Generates a root token on the target cluster.

func GenerateRootWithError

func GenerateRootWithError(t testing.T, cluster *vault.TestCluster, drToken bool) (string, error)

func GetClusterAndCore added in v1.0.0

func GetClusterAndCore(t testing.T, logger log.Logger, handlerFunc func(*vault.HandlerProperties) http.Handler) (*vault.TestCluster, *vault.TestClusterCore)

func RandomWithPrefix added in v0.11.0

func RandomWithPrefix(name string) string

RandomWithPrefix is used to generate a unique name with a prefix, for randomizing names in acceptance tests

func SetupFourClusterReplication added in v0.11.2

func SetupFourClusterReplication(t testing.T, perfPrimary, perfSecondary, perfDRSecondary, perfSecondaryDRSecondary *vault.TestCluster)

func SetupTwoClusterPerfReplication added in v1.0.3

func SetupTwoClusterPerfReplication(t testing.T, perfPrimary, perfSecondary *vault.TestCluster)

func WaitForActiveNode added in v1.1.0

func WaitForActiveNode(t testing.T, cluster *vault.TestCluster) *vault.TestClusterCore

func WaitForNCoresSealed added in v0.11.2

func WaitForNCoresSealed(t testing.T, cluster *vault.TestCluster, n int)

func WaitForReplicationState added in v0.11.2

func WaitForReplicationState(t testing.T, c *vault.Core, state consts.ReplicationState)

Types

type ReplicatedTestClusters added in v1.0.0

type ReplicatedTestClusters struct {
	PerfPrimaryCluster     *vault.TestCluster
	PerfSecondaryCluster   *vault.TestCluster
	PerfPrimaryDRCluster   *vault.TestCluster
	PerfSecondaryDRCluster *vault.TestCluster
}

func GetFourReplicatedClusters added in v1.0.0

func GetFourReplicatedClusters(t testing.T, handlerFunc func(*vault.HandlerProperties) http.Handler) *ReplicatedTestClusters

func GetPerfReplicatedClusters added in v1.0.3

func GetPerfReplicatedClusters(t testing.T, handlerFunc func(*vault.HandlerProperties) http.Handler) *ReplicatedTestClusters

func (*ReplicatedTestClusters) Cleanup added in v1.0.0

func (r *ReplicatedTestClusters) Cleanup()

Jump to

Keyboard shortcuts

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