Back to / helper / testhelpers

package testhelpers

Latest Go to latest
Published: Jul 2, 2020 | License: MPL-2.0 | Module:


func AttemptUnsealCore

func AttemptUnsealCore(c *vault.TestCluster, core *vault.TestClusterCore) error

func AttemptUnsealCores

func AttemptUnsealCores(c *vault.TestCluster) error

func DeriveActiveCore

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

func DeriveStableActiveCore

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

func DeriveStandbyCores

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

func EnsureCoreSealed

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

func EnsureCoreUnsealed

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

func EnsureCoresSealed

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

func EnsureCoresUnsealed

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

func EnsureStableActiveNode

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

func GenerateRoot

func GenerateRoot(t testing.T, cluster *vault.TestCluster, kind GenerateRootKind) string

Generates a root token on the target cluster.

func GenerateRootWithError

func GenerateRootWithError(t testing.T, cluster *vault.TestCluster, kind GenerateRootKind) (string, error)

func RaftClusterJoinNodes

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

func RandomWithPrefix

func RandomWithPrefix(name string) string

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

func RekeyCluster

func RekeyCluster(t testing.T, cluster *vault.TestCluster, recovery bool) [][]byte

func WaitForActiveNode

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

func WaitForNCoresSealed

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

func WaitForNCoresUnsealed

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

func WaitForStandbyNode

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

type GenerateRootKind

type GenerateRootKind int
const (
	GenerateRootRegular GenerateRootKind = iota

type TestRaftServerAddressProvider

type TestRaftServerAddressProvider struct {
	Cluster *vault.TestCluster

func (*TestRaftServerAddressProvider) ServerAddr

func (p *TestRaftServerAddressProvider) ServerAddr(id raftlib.ServerID) (raftlib.ServerAddress, error)
Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier