From 3c70549d1c07f3c0f3d9c71c1a20f43e613f9679 Mon Sep 17 00:00:00 2001 From: Nick Cabatoff Date: Thu, 30 Jan 2020 11:39:11 -0500 Subject: [PATCH] Fix flaky test of api renewer by moving away from legacy api. --- vault/external_tests/api/renewer_integration_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/vault/external_tests/api/renewer_integration_test.go b/vault/external_tests/api/renewer_integration_test.go index 66a260879daa..ca6fd38b7db7 100644 --- a/vault/external_tests/api/renewer_integration_test.go +++ b/vault/external_tests/api/renewer_integration_test.go @@ -28,7 +28,7 @@ func TestRenewer_Renew(t *testing.T) { t.Fatal(err) } - v, err := client.NewRenewer(&api.RenewerInput{ + v, err := client.NewLifetimeWatcher(&api.RenewerInput{ Secret: secret, }) if err != nil { @@ -39,7 +39,7 @@ func TestRenewer_Renew(t *testing.T) { select { case err := <-v.DoneCh(): - if err != api.ErrRenewerNotRenewable { + if err != api.ErrLifetimeWatcherNotRenewable { t.Fatal(err) } case renew := <-v.RenewCh(): @@ -65,7 +65,7 @@ func TestRenewer_Renew(t *testing.T) { t.Fatal(err) } - v, err := client.NewRenewer(&api.RenewerInput{ + v, err := client.NewLifetimeWatcher(&api.RenewerInput{ Secret: secret, }) if err != nil { @@ -76,7 +76,7 @@ func TestRenewer_Renew(t *testing.T) { select { case err := <-v.DoneCh(): - if err != api.ErrRenewerNotRenewable { + if err != api.ErrLifetimeWatcherNotRenewable { t.Fatal(err) } case renew := <-v.RenewCh(): @@ -120,7 +120,7 @@ func TestRenewer_Renew(t *testing.T) { t.Fatal(err) } - v, err := client.NewRenewer(&api.RenewerInput{ + v, err := client.NewLifetimeWatcher(&api.RenewerInput{ Secret: secret, }) if err != nil { @@ -180,7 +180,7 @@ func TestRenewer_Renew(t *testing.T) { t.Fatal(err) } - v, err := client.NewRenewer(&api.RenewerInput{ + v, err := client.NewLifetimeWatcher(&api.RenewerInput{ Secret: secret, }) if err != nil {