Skip to content

Commit 5e9cbe8

Browse files
authored
chore(coderd): remove dbmem from tests (#18800)
Related to #15109.
1 parent 66e4909 commit 5e9cbe8

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

coderd/workspaceagents_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ import (
4646
"github.com/coder/coder/v2/coderd/database/dbauthz"
4747
"github.com/coder/coder/v2/coderd/database/dbfake"
4848
"github.com/coder/coder/v2/coderd/database/dbgen"
49-
"github.com/coder/coder/v2/coderd/database/dbmem"
5049
"github.com/coder/coder/v2/coderd/database/dbtestutil"
5150
"github.com/coder/coder/v2/coderd/database/dbtime"
5251
"github.com/coder/coder/v2/coderd/database/pubsub"
@@ -1989,8 +1988,8 @@ func (s *testWAMErrorStore) GetWorkspaceAgentMetadata(ctx context.Context, arg d
19891988
func TestWorkspaceAgent_Metadata_CatchMemoryLeak(t *testing.T) {
19901989
t.Parallel()
19911990

1992-
db := &testWAMErrorStore{Store: dbmem.New()}
1993-
psub := pubsub.NewInMemory()
1991+
store, psub := dbtestutil.NewDB(t)
1992+
db := &testWAMErrorStore{Store: store}
19941993
logger := slogtest.Make(t, &slogtest.Options{IgnoreErrors: true}).Named("coderd").Leveled(slog.LevelDebug)
19951994
client := coderdtest.New(t, &coderdtest.Options{
19961995
Database: db,

coderd/workspaces_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"fmt"
99
"math"
1010
"net/http"
11-
"os"
1211
"slices"
1312
"strings"
1413
"testing"
@@ -1426,9 +1425,6 @@ func TestWorkspaceByOwnerAndName(t *testing.T) {
14261425
// TestWorkspaceFilterAllStatus tests workspace status is correctly set given a set of conditions.
14271426
func TestWorkspaceFilterAllStatus(t *testing.T) {
14281427
t.Parallel()
1429-
if os.Getenv("DB") != "" {
1430-
t.Skip(`This test takes too long with an actual database. Takes 10s on local machine`)
1431-
}
14321428

14331429
// For this test, we do not care about permissions.
14341430
// nolint:gocritic // unit testing

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy