@@ -12,6 +12,7 @@ import (
12
12
"github.com/coder/coder/v2/coderd/coderdtest"
13
13
"github.com/coder/coder/v2/coderd/database"
14
14
"github.com/coder/coder/v2/coderd/database/dbfake"
15
+ "github.com/coder/coder/v2/coderd/database/dbtestutil"
15
16
"github.com/coder/coder/v2/codersdk"
16
17
"github.com/coder/coder/v2/provisioner/echo"
17
18
"github.com/coder/coder/v2/provisionersdk/proto"
@@ -412,10 +413,11 @@ func TestStart_Starting(t *testing.T) {
412
413
t .Parallel ()
413
414
ctx := testutil .Context (t , testutil .WaitShort )
414
415
415
- client , db := coderdtest .NewWithDatabase (t , nil )
416
+ store , ps := dbtestutil .NewDB (t )
417
+ client := coderdtest .New (t , & coderdtest.Options {Pubsub : ps , Database : store })
416
418
owner := coderdtest .CreateFirstUser (t , client )
417
419
memberClient , member := coderdtest .CreateAnotherUser (t , client , owner .OrganizationID )
418
- r := dbfake .WorkspaceBuild (t , db , database.Workspace {
420
+ r := dbfake .WorkspaceBuild (t , store , database.Workspace {
419
421
OwnerID : member .ID ,
420
422
OrganizationID : owner .OrganizationID ,
421
423
}).
@@ -434,7 +436,7 @@ func TestStart_Starting(t *testing.T) {
434
436
435
437
pty .ExpectMatch ("workspace is already starting" )
436
438
437
- _ = dbfake .JobComplete (t , db , r .Build .JobID ).Do ()
439
+ _ = dbfake .JobComplete (t , store , r .Build .JobID ). Pubsub ( ps ).Do ()
438
440
pty .ExpectMatch ("workspace has been started" )
439
441
440
442
_ = testutil .RequireRecvCtx (ctx , t , doneChan )
0 commit comments