Skip to content

Commit 09c816f

Browse files
committed
sidestep dbmem
1 parent 451e983 commit 09c816f

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

coderd/database/dbauthz/dbauthz_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1576,7 +1576,7 @@ func (s *MethodTestSuite) TestUser() {
15761576
OrganizationID: uuid.New(),
15771577
}).Asserts(u, policy.ActionRead).Returns(int64(0))
15781578
s.Run("ExpirePrebuildsAPIKeys", s.Subtest(func(db database.Store, check *expects) {
1579-
check.Args(dbtime.Now()).Asserts(rbac.ResourceApiKey, policy.ActionDelete).ErrorsWithInMemDB(dbmem.ErrUnimplemented)
1579+
check.Args(dbtime.Now()).Asserts(rbac.ResourceApiKey, policy.ActionDelete).Returns()
15801580
}))
15811581
}))
15821582
s.Run("GetQuotaConsumedForUser", s.Subtest(func(db database.Store, check *expects) {

coderd/database/dbmem/dbmem.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2597,6 +2597,11 @@ func (q *FakeQuerier) EnqueueNotificationMessage(_ context.Context, arg database
25972597
return err
25982598
}
25992599

2600+
func (*FakeQuerier) ExpirePrebuildsAPIKeys(_ context.Context, _ time.Time) error {
2601+
// Implemented in postgres.
2602+
return nil
2603+
}
2604+
26002605
func (q *FakeQuerier) FavoriteWorkspace(_ context.Context, arg uuid.UUID) error {
26012606
err := validateDatabaseType(arg)
26022607
if err != nil {
@@ -14020,7 +14025,3 @@ func (q *FakeQuerier) CountAuthorizedAuditLogs(ctx context.Context, arg database
1402014025

1402114026
return count, nil
1402214027
}
14023-
14024-
func (q *FakeQuerier) ExpirePrebuildsAPIKeys(_ context.Context, _ time.Time) error {
14025-
return ErrUnimplemented
14026-
}

0 commit comments

Comments
 (0)