Skip to content

Commit

Permalink
ensure that we're testing failure case against a standby node
Browse files Browse the repository at this point in the history
  • Loading branch information
calvn committed Sep 5, 2019
1 parent fd3f116 commit e858dd4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion http/sys_hostinfo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,16 @@ func TestSysHostInfo(t *testing.T) {
t.Fatal("expected memory info")
}

// Query against the standby, should error
// Check we're standby
healthResp, err := cores[1].Client.Sys().Health()
if err != nil {
t.Fatal(err)
}
if !healthResp.Standby {
t.Fatal("expected node to be standby")
}

// Query against a standby, should error
secret, err = cores[1].Client.Logical().Read("sys/host-info")
if err == nil || secret != nil {
t.Fatalf("expected error on standby node, HostInfo: %v", secret)
Expand Down

0 comments on commit e858dd4

Please sign in to comment.