Skip to content

Commit

Permalink
Fix flaky test of api renewer by moving away from legacy api. (#8265)
Browse files Browse the repository at this point in the history
  • Loading branch information
ncabatoff authored Jan 30, 2020
1 parent 8d46856 commit 492ae16
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions vault/external_tests/api/renewer_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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():
Expand All @@ -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 {
Expand All @@ -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():
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 492ae16

Please sign in to comment.