From ceab0a5031703ffef5dfeb246dcf14058ff81344 Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Tue, 14 Apr 2015 16:08:14 -0700 Subject: [PATCH] vault: testing standby mode --- vault/core_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vault/core_test.go b/vault/core_test.go index ed2f91007f..3fd41e7cf2 100644 --- a/vault/core_test.go +++ b/vault/core_test.go @@ -1062,6 +1062,12 @@ func TestCore_Standby(t *testing.T) { t.Fatalf("should be standby") } + // Request should fail in standby mode + _, err = core2.HandleRequest(req) + if err != ErrStandby { + t.Fatalf("err: %v", err) + } + // Seal the first core, should step down err = core.Seal(root) if err != nil {