vault: github.com/hashicorp/vault/helper/testhelpers Index | Files | Directories

package testhelpers

import "github.com/hashicorp/vault/helper/testhelpers"

Index

Package Files

testhelpers.go

func ConfClusterAndCore Uses

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

func CreateRaftBackend Uses

func CreateRaftBackend(t testing.T, logger hclog.Logger, nodeID string) (physical.Backend, func(), error)

func DeriveActiveCore Uses

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

func DeriveStandbyCores Uses

func DeriveStandbyCores(t testing.T, cluster *vault.TestCluster) []*vault.TestClusterCore

func EnsureCoreIsPerfStandby Uses

func EnsureCoreIsPerfStandby(t testing.T, client *api.Client)

func EnsureCoreSealed Uses

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

func EnsureCoreUnsealed Uses

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

func EnsureCoresSealed Uses

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

func EnsureCoresUnsealed Uses

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

func EnsureStableActiveNode Uses

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

func GenerateRoot Uses

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

Generates a root token on the target cluster.

func GenerateRootWithError Uses

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

func PassthroughWithLocalPathsFactory Uses

func PassthroughWithLocalPathsFactory(ctx context.Context, c *logical.BackendConfig) (logical.Backend, error)

func RaftClusterJoinNodes Uses

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

func RandomWithPrefix Uses

func RandomWithPrefix(name string) string

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

func RekeyCluster Uses

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

func SetupFourClusterReplication Uses

func SetupFourClusterReplication(t testing.T, pri, sec, pridr, secdr *vault.TestCluster)

func SetupTwoClusterPerfReplication Uses

func SetupTwoClusterPerfReplication(t testing.T, pri, sec *vault.TestCluster)

func WaitForActiveNode Uses

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

func WaitForActiveNodeAndPerfStandbys Uses

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

func WaitForMatchingMerkleRoots Uses

func WaitForMatchingMerkleRoots(t testing.T, endpoint string, primary, secondary *api.Client)

func WaitForMatchingMerkleRootsCore Uses

func WaitForMatchingMerkleRootsCore(t testing.T, pri, sec *vault.TestClusterCore, dr bool)

func WaitForNCoresSealed Uses

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

func WaitForNCoresUnsealed Uses

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

func WaitForPerfReplicationWorking Uses

func WaitForPerfReplicationWorking(t testing.T, pri, sec *vault.TestCluster)

WaitForPerfReplicationWorking mounts a KV non-locally, writes to it on pri, and waits for the value to be readable on sec.

func WaitForReplicationState Uses

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

func WaitForReplicationStatus Uses

func WaitForReplicationStatus(t testing.T, client *api.Client, dr bool, accept func(map[string]interface{}) bool)

func WaitForWAL Uses

func WaitForWAL(t testing.T, c *vault.TestClusterCore, wal uint64)

type PassthroughWithLocalPaths Uses

type PassthroughWithLocalPaths struct {
    logical.Backend
}

func (*PassthroughWithLocalPaths) SpecialPaths Uses

func (p *PassthroughWithLocalPaths) SpecialPaths() *logical.Paths

type ReplicatedTestClusters Uses

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

func GetFourReplicatedClusters Uses

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

func GetFourReplicatedClustersWithConf Uses

func GetFourReplicatedClustersWithConf(t testing.T, conf *vault.CoreConfig, opts *vault.TestClusterOptions) *ReplicatedTestClusters

func GetPerfReplicatedClusters Uses

func GetPerfReplicatedClusters(t testing.T, conf *vault.CoreConfig, opts *vault.TestClusterOptions) *ReplicatedTestClusters

func (*ReplicatedTestClusters) Cleanup Uses

func (r *ReplicatedTestClusters) Cleanup()

func (*ReplicatedTestClusters) Primary Uses

func (r *ReplicatedTestClusters) Primary() (*vault.TestCluster, *vault.TestClusterCore, *api.Client)

func (*ReplicatedTestClusters) PrimaryDR Uses

func (r *ReplicatedTestClusters) PrimaryDR() (*vault.TestCluster, *vault.TestClusterCore, *api.Client)

func (*ReplicatedTestClusters) Secondary Uses

func (r *ReplicatedTestClusters) Secondary() (*vault.TestCluster, *vault.TestClusterCore, *api.Client)

func (*ReplicatedTestClusters) SecondaryDR Uses

func (r *ReplicatedTestClusters) SecondaryDR() (*vault.TestCluster, *vault.TestClusterCore, *api.Client)

type ReplicatedTestClustersBuilder Uses

type ReplicatedTestClustersBuilder struct {
    // contains filtered or unexported fields
}

type TestRaftServerAddressProvider Uses

type TestRaftServerAddressProvider struct {
    Cluster *vault.TestCluster
}

func (*TestRaftServerAddressProvider) ServerAddr Uses

func (p *TestRaftServerAddressProvider) ServerAddr(id raftlib.ServerID) (raftlib.ServerAddress, error)

Directories

PathSynopsis
consul
docker
logical
mongodb

Package testhelpers imports 31 packages (graph) and is imported by 2 packages. Updated 2019-07-24. Refresh now. Tools for package owners.