Skip to content

Commit ea82313

Browse files
committed
use dbtestutil.NewDB instead of dbmem
1 parent 7b9d70a commit ea82313

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

coderd/telemetry/telemetry_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"github.com/coder/coder/v2/coderd/database"
2222
"github.com/coder/coder/v2/coderd/database/dbgen"
2323
"github.com/coder/coder/v2/coderd/database/dbmem"
24+
"github.com/coder/coder/v2/coderd/database/dbtestutil"
2425
"github.com/coder/coder/v2/coderd/database/dbtime"
2526
"github.com/coder/coder/v2/coderd/telemetry"
2627
"github.com/coder/coder/v2/testutil"
@@ -125,12 +126,15 @@ func TestTelemetry(t *testing.T) {
125126
})
126127
t.Run("HashedModule", func(t *testing.T) {
127128
t.Parallel()
128-
db := dbmem.New()
129+
db, _ := dbtestutil.NewDB(t)
130+
pj := dbgen.ProvisionerJob(t, db, nil, database.ProvisionerJob{})
129131
_ = dbgen.WorkspaceModule(t, db, database.WorkspaceModule{
132+
JobID: pj.ID,
130133
Source: "registry.coder.com/terraform/aws",
131134
Version: "1.0.0",
132135
})
133136
_ = dbgen.WorkspaceModule(t, db, database.WorkspaceModule{
137+
JobID: pj.ID,
134138
Source: "internal-url.com/some-module",
135139
Version: "1.0.0",
136140
})

0 commit comments

Comments
 (0)