diff --git a/vault/expiration_test.go b/vault/expiration_test.go index 99018ca73..7a6079ece 100644 --- a/vault/expiration_test.go +++ b/vault/expiration_test.go @@ -2531,7 +2531,8 @@ func registerOneLease(t *testing.T, ctx context.Context, exp *ExpirationManager) } func TestExpiration_MarkIrrevocable(t *testing.T) { - exp := mockExpiration(t) + c, _, _ := TestCoreUnsealed(t) + exp := c.expiration ctx := namespace.RootContext(nil) leaseID := registerOneLease(t, ctx, exp) @@ -2570,7 +2571,7 @@ func TestExpiration_MarkIrrevocable(t *testing.T) { } // stop and restore to verify that irrevocable leases are properly loaded from storage - err = exp.Stop() + err = c.stopExpiration() if err != nil { t.Fatalf("error stopping expiration manager: %v", err) } @@ -2646,7 +2647,8 @@ func TestExpiration_FetchLeaseTimesIrrevocable(t *testing.T) { } func TestExpiration_StopClearsIrrevocableCache(t *testing.T) { - exp := mockExpiration(t) + c, _, _ := TestCoreUnsealed(t) + exp := c.expiration ctx := namespace.RootContext(nil) leaseID := registerOneLease(t, ctx, exp) @@ -2656,7 +2658,7 @@ func TestExpiration_StopClearsIrrevocableCache(t *testing.T) { } exp.markLeaseIrrevocable(ctx, le, fmt.Errorf("test irrevocable error")) - err = exp.Stop() + err = c.stopExpiration() if err != nil { t.Fatalf("error stopping expiration manager: %v", err) }