Skip to content

Commit

Permalink
e2e: update cluster-health test for new etcdctl output
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthony Romano committed Jun 9, 2017
1 parent ad0b3cf commit 36ec217
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions e2e/ctl_v2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,17 +321,23 @@ func TestCtlV2ClusterHealth(t *testing.T) {
}
}()

// has quorum
// all members available
if err := etcdctlClusterHealth(epc, "cluster is healthy"); err != nil {
t.Fatalf("cluster-health expected to be healthy (%v)", err)
}

// cut quorum
// missing members, has quorum
epc.procs[0].Stop()
if err := etcdctlClusterHealth(epc, "cluster is degraded"); err != nil {
t.Fatalf("cluster-health expected to be degraded (%v)", err)
}

// no quorum
epc.procs[1].Stop()
if err := etcdctlClusterHealth(epc, "cluster is unhealthy"); err != nil {
t.Fatalf("cluster-health expected to be unhealthy (%v)", err)
if err := etcdctlClusterHealth(epc, "cluster is unavailable"); err != nil {
t.Fatalf("cluster-health expected to be unavailable (%v)", err)
}

epc.procs[0], epc.procs[1] = nil, nil
}

Expand Down

0 comments on commit 36ec217

Please sign in to comment.