mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcd: add a bootstrap test
This commit is contained in:
parent
b49cbc959b
commit
d7eef6a64e
@ -98,6 +98,21 @@ func TestBadDiscoveryServiceWithAdvisedPeers(t *testing.T) {
|
||||
afterTest(t)
|
||||
}
|
||||
|
||||
func TestBootstrapByEmptyPeers(t *testing.T) {
|
||||
c := config.New()
|
||||
id := genId()
|
||||
e, h, err := buildServer(c, id)
|
||||
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
if e.p.node.Leader() != id {
|
||||
t.Error("leader = %x, want %x", e.p.node.Leader(), id)
|
||||
}
|
||||
destroyServer(e, h)
|
||||
afterTest(t)
|
||||
}
|
||||
|
||||
func TestBootstrapByDiscoveryService(t *testing.T) {
|
||||
de, dh, _ := buildServer(config.New(), genId())
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user