testrpc

package
v1.16.109 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WaitForACLReplication added in v1.16.100

func WaitForACLReplication(t *testing.T, rpc rpcFn, dc string, expectedReplicationType structs.ACLReplicationType, minPolicyIndex, minTokenIndex, minRoleIndex uint64)

func WaitForActiveCARoot added in v1.16.100

func WaitForActiveCARoot(t *testing.T, rpc rpcFn, dc string, expect *structs.CARoot)

WaitForActiveCARoot polls until the server returns an active Connect root CA with the same ID field as expect. If expect is nil, it just waits until _any_ active root is returned. This is useful because initializing CA happens after raft leadership is gained so WaitForLeader isn't sufficient to be sure that the CA is fully initialized.

func WaitForAntiEntropySync added in v1.16.100

func WaitForAntiEntropySync() waitOption

func WaitForLeader

func WaitForLeader(t *testing.T, rpc rpcFn, dc string, options ...waitOption)

WaitForLeader ensures we have a leader and a node registration. It does not wait for the Consul (node) service to be ready. Use `WaitForTestAgent` to make sure the Consul service is ready.

Most uses of this would be better served in the agent/consul package by using waitForLeaderEstablishment() instead.

func WaitForServiceIntentions added in v1.16.100

func WaitForServiceIntentions(t *testing.T, rpc rpcFn, dc string)

WaitForServiceIntentions waits until the server can accept config entry kinds of service-intentions meaning any migration bootstrapping from pre-1.9 intentions has completed.

func WaitForTestAgent added in v1.2.3

func WaitForTestAgent(t *testing.T, rpc rpcFn, dc string, options ...waitOption)

WaitForTestAgent ensures we have a node with serfHealth check registered. You'll want to use this if you expect the Consul (node) service to be ready.

func WaitUntilNoLeader added in v1.2.3

func WaitUntilNoLeader(t *testing.T, rpc rpcFn, dc string, options ...waitOption)

WaitUntilNoLeader ensures no leader is present, useful for testing lost leadership.

func WithToken added in v1.4.2

func WithToken(token string) waitOption

Types

This section is empty.

Jump to

Keyboard shortcuts

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