Documentation ¶
Index ¶
- type MockDNSProvider
- type TestHarness
- func (h *TestHarness) AddCommand(cmd *protoetcd.Command)
- func (h *TestHarness) Close()
- func (h *TestHarness) InvalidateControlStore(nodes ...*TestHarnessNode)
- func (h *TestHarness) NewNode(address string) *TestHarnessNode
- func (h *TestHarness) SeedNewCluster(spec *protoetcd.ClusterSpec)
- func (h *TestHarness) SetClusterSpec(spec *protoetcd.ClusterSpec)
- func (h *TestHarness) WaitFor(timeout time.Duration, description string, f func() error)
- func (h *TestHarness) WaitForBackup(t *testing.T, timeout time.Duration)
- func (h *TestHarness) WaitForHasLeader(nodes ...*TestHarnessNode)
- func (h *TestHarness) WaitForHealthy(nodes ...*TestHarnessNode)
- func (h *TestHarness) WaitForVersion(timeout time.Duration, expectedVersion string, nodes ...*TestHarnessNode)
- type TestHarnessNode
- func (n *TestHarnessNode) AssertVersion(t *testing.T, version string)
- func (n *TestHarnessNode) Close() error
- func (n *TestHarnessNode) GetLocal(ctx context.Context, key string) (string, error)
- func (n *TestHarnessNode) GetQuorum(ctx context.Context, key string) (string, error)
- func (n *TestHarnessNode) Init() error
- func (n *TestHarnessNode) ListMembers(ctx context.Context) ([]*etcdclient.EtcdProcessMember, error)
- func (n *TestHarnessNode) NewClient() (*etcdclient.EtcdClient, error)
- func (n *TestHarnessNode) Put(ctx context.Context, key string, value string) error
- func (n *TestHarnessNode) Run()
- func (n *TestHarnessNode) WaitForHasLeader(timeout time.Duration)
- func (n *TestHarnessNode) WaitForHealthy(timeout time.Duration)
- func (n *TestHarnessNode) WaitForListMembers(timeout time.Duration)
- func (n *TestHarnessNode) WaitForQuorumRead(ctx context.Context, timeout time.Duration)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockDNSProvider ¶
type MockDNSProvider struct { }
func (*MockDNSProvider) AddFallbacks ¶
func (p *MockDNSProvider) AddFallbacks(dnsFallbacks map[string][]net.IP) error
func (*MockDNSProvider) UpdateHosts ¶
func (p *MockDNSProvider) UpdateHosts(addToHost map[string][]string) error
type TestHarness ¶
type TestHarness struct { T *testing.T ClusterName string LockPath string BackupStorePath string DiscoveryStoreDir string WorkDir string Nodes map[string]*TestHarnessNode Context context.Context BackupInterval time.Duration // contains filtered or unexported fields }
func NewTestHarness ¶
func NewTestHarness(t *testing.T, ctx context.Context) *TestHarness
func (*TestHarness) AddCommand ¶
func (h *TestHarness) AddCommand(cmd *protoetcd.Command)
func (*TestHarness) Close ¶
func (h *TestHarness) Close()
func (*TestHarness) InvalidateControlStore ¶
func (h *TestHarness) InvalidateControlStore(nodes ...*TestHarnessNode)
func (*TestHarness) NewNode ¶
func (h *TestHarness) NewNode(address string) *TestHarnessNode
func (*TestHarness) SeedNewCluster ¶
func (h *TestHarness) SeedNewCluster(spec *protoetcd.ClusterSpec)
func (*TestHarness) SetClusterSpec ¶
func (h *TestHarness) SetClusterSpec(spec *protoetcd.ClusterSpec)
func (*TestHarness) WaitFor ¶
func (h *TestHarness) WaitFor(timeout time.Duration, description string, f func() error)
func (*TestHarness) WaitForBackup ¶
func (h *TestHarness) WaitForBackup(t *testing.T, timeout time.Duration)
func (*TestHarness) WaitForHasLeader ¶
func (h *TestHarness) WaitForHasLeader(nodes ...*TestHarnessNode)
func (*TestHarness) WaitForHealthy ¶
func (h *TestHarness) WaitForHealthy(nodes ...*TestHarnessNode)
func (*TestHarness) WaitForVersion ¶
func (h *TestHarness) WaitForVersion(timeout time.Duration, expectedVersion string, nodes ...*TestHarnessNode)
type TestHarnessNode ¶
type TestHarnessNode struct { TestHarness *TestHarness Address string NodeDir string EtcdVersion string InsecureMode bool ClientURL string ListenMetricsURLs []string // contains filtered or unexported fields }
func (*TestHarnessNode) AssertVersion ¶
func (n *TestHarnessNode) AssertVersion(t *testing.T, version string)
AssertVersion asserts that the client reports the server version specified
func (*TestHarnessNode) Close ¶
func (n *TestHarnessNode) Close() error
func (*TestHarnessNode) Init ¶
func (n *TestHarnessNode) Init() error
func (*TestHarnessNode) ListMembers ¶
func (n *TestHarnessNode) ListMembers(ctx context.Context) ([]*etcdclient.EtcdProcessMember, error)
func (*TestHarnessNode) NewClient ¶
func (n *TestHarnessNode) NewClient() (*etcdclient.EtcdClient, error)
func (*TestHarnessNode) Run ¶
func (n *TestHarnessNode) Run()
func (*TestHarnessNode) WaitForHasLeader ¶
func (n *TestHarnessNode) WaitForHasLeader(timeout time.Duration)
func (*TestHarnessNode) WaitForHealthy ¶
func (n *TestHarnessNode) WaitForHealthy(timeout time.Duration)
func (*TestHarnessNode) WaitForListMembers ¶
func (n *TestHarnessNode) WaitForListMembers(timeout time.Duration)
func (*TestHarnessNode) WaitForQuorumRead ¶
func (n *TestHarnessNode) WaitForQuorumRead(ctx context.Context, timeout time.Duration)
Click to show internal directories.
Click to hide internal directories.