chore(coderd): remove dbmem from tests (#18800)

Related to https://github.com/coder/coder/issues/15109.
This commit is contained in:
Hugo Dutka
2025-07-08 15:19:14 +00:00
committed by GitHub
parent 66e490986f
commit 5e9cbe8a1b
2 changed files with 2 additions and 7 deletions
+2 -3
View File
@@ -46,7 +46,6 @@ import (
"github.com/coder/coder/v2/coderd/database/dbauthz"
"github.com/coder/coder/v2/coderd/database/dbfake"
"github.com/coder/coder/v2/coderd/database/dbgen"
"github.com/coder/coder/v2/coderd/database/dbmem"
"github.com/coder/coder/v2/coderd/database/dbtestutil"
"github.com/coder/coder/v2/coderd/database/dbtime"
"github.com/coder/coder/v2/coderd/database/pubsub"
@@ -1989,8 +1988,8 @@ func (s *testWAMErrorStore) GetWorkspaceAgentMetadata(ctx context.Context, arg d
func TestWorkspaceAgent_Metadata_CatchMemoryLeak(t *testing.T) {
t.Parallel()
db := &testWAMErrorStore{Store: dbmem.New()}
psub := pubsub.NewInMemory()
store, psub := dbtestutil.NewDB(t)
db := &testWAMErrorStore{Store: store}
logger := slogtest.Make(t, &slogtest.Options{IgnoreErrors: true}).Named("coderd").Leveled(slog.LevelDebug)
client := coderdtest.New(t, &coderdtest.Options{
Database: db,
-4
View File
@@ -8,7 +8,6 @@ import (
"fmt"
"math"
"net/http"
"os"
"slices"
"strings"
"testing"
@@ -1426,9 +1425,6 @@ func TestWorkspaceByOwnerAndName(t *testing.T) {
// TestWorkspaceFilterAllStatus tests workspace status is correctly set given a set of conditions.
func TestWorkspaceFilterAllStatus(t *testing.T) {
t.Parallel()
if os.Getenv("DB") != "" {
t.Skip(`This test takes too long with an actual database. Takes 10s on local machine`)
}
// For this test, we do not care about permissions.
// nolint:gocritic // unit testing