Skip to content

chore(coderd): remove dbmem from tests #18800

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions coderd/workspaceagents_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 0 additions & 4 deletions coderd/workspaces_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"fmt"
"math"
"net/http"
"os"
"slices"
"strings"
"testing"
Expand Down Expand Up @@ -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
Expand Down
Loading