Documentation ¶
Overview ¶
Package integration implements tests built upon embedded etcd, and focus on etcd correctness.
Features/goals of the integration tests: 1. test the whole code base except command-line parsing. 2. check internal data, including raft, store and etc. 3. based on goroutines, which is faster than process. 4. mainly tests user behavior and user-facing API.
Index ¶
- func NewClientV3(m *member) (*clientv3.Client, error)
- func NewCluster(t *testing.T, size int) *cluster
- func NewClusterByConfig(t *testing.T, cfg *ClusterConfig) *cluster
- type ClusterConfig
- type ClusterV3
- func (c ClusterV3) AddMember(t *testing.T)
- func (c *ClusterV3) Client(i int) *clientv3.Client
- func (c ClusterV3) HTTPMembers() []client.Member
- func (c ClusterV3) Launch(t *testing.T)
- func (c *ClusterV3) RandClient() *clientv3.Client
- func (c ClusterV3) RemoveMember(t *testing.T, id uint64)
- func (c *ClusterV3) Terminate(t *testing.T)
- func (c ClusterV3) URL(i int) string
- func (c ClusterV3) URLs() []string
- type SortableMemberSliceByPeerURLs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClientV3 ¶
NewClientV3 creates a new grpc client connection to the member
func NewCluster ¶
NewCluster returns an unlaunched cluster of the given size which has been set to use static bootstrap.
func NewClusterByConfig ¶
func NewClusterByConfig(t *testing.T, cfg *ClusterConfig) *cluster
NewClusterByConfig returns an unlaunched cluster defined by a cluster configuration
Types ¶
type ClusterConfig ¶
type ClusterV3 ¶
type ClusterV3 struct {
// contains filtered or unexported fields
}
func NewClusterV3 ¶
func NewClusterV3(t *testing.T, cfg *ClusterConfig) *ClusterV3
NewClusterV3 returns a launched cluster with a grpc client connection for each cluster member.
func (ClusterV3) HTTPMembers ¶
HTTPMembers returns a list of all active members as client.Members
func (*ClusterV3) RandClient ¶
func (ClusterV3) RemoveMember ¶
type SortableMemberSliceByPeerURLs ¶
func (SortableMemberSliceByPeerURLs) Len ¶
func (p SortableMemberSliceByPeerURLs) Len() int
func (SortableMemberSliceByPeerURLs) Less ¶
func (p SortableMemberSliceByPeerURLs) Less(i, j int) bool
func (SortableMemberSliceByPeerURLs) Swap ¶
func (p SortableMemberSliceByPeerURLs) Swap(i, j int)