@@ -19,6 +19,7 @@ import (
19
19
"github.com/coder/coder/v2/coderd/database"
20
20
"github.com/coder/coder/v2/coderd/database/dbmock"
21
21
"github.com/coder/coder/v2/coderd/database/dbtime"
22
+ "github.com/coder/coder/v2/coderd/wspubsub"
22
23
"github.com/coder/coder/v2/codersdk/agentsdk"
23
24
)
24
25
@@ -50,7 +51,7 @@ func TestBatchCreateLogs(t *testing.T) {
50
51
},
51
52
Database : dbM ,
52
53
Log : slogtest .Make (t , nil ),
53
- PublishWorkspaceUpdateFn : func (ctx context.Context , wa * database.WorkspaceAgent ) error {
54
+ PublishWorkspaceUpdateFn : func (ctx context.Context , wa * database.WorkspaceAgent , kind wspubsub. WorkspaceEventKind ) error {
54
55
publishWorkspaceUpdateCalled = true
55
56
return nil
56
57
},
@@ -154,7 +155,7 @@ func TestBatchCreateLogs(t *testing.T) {
154
155
},
155
156
Database : dbM ,
156
157
Log : slogtest .Make (t , nil ),
157
- PublishWorkspaceUpdateFn : func (ctx context.Context , wa * database.WorkspaceAgent ) error {
158
+ PublishWorkspaceUpdateFn : func (ctx context.Context , wa * database.WorkspaceAgent , kind wspubsub. WorkspaceEventKind ) error {
158
159
publishWorkspaceUpdateCalled = true
159
160
return nil
160
161
},
@@ -202,7 +203,7 @@ func TestBatchCreateLogs(t *testing.T) {
202
203
},
203
204
Database : dbM ,
204
205
Log : slogtest .Make (t , nil ),
205
- PublishWorkspaceUpdateFn : func (ctx context.Context , wa * database.WorkspaceAgent ) error {
206
+ PublishWorkspaceUpdateFn : func (ctx context.Context , wa * database.WorkspaceAgent , kind wspubsub. WorkspaceEventKind ) error {
206
207
publishWorkspaceUpdateCalled = true
207
208
return nil
208
209
},
@@ -295,7 +296,7 @@ func TestBatchCreateLogs(t *testing.T) {
295
296
},
296
297
Database : dbM ,
297
298
Log : slogtest .Make (t , nil ),
298
- PublishWorkspaceUpdateFn : func (ctx context.Context , wa * database.WorkspaceAgent ) error {
299
+ PublishWorkspaceUpdateFn : func (ctx context.Context , wa * database.WorkspaceAgent , kind wspubsub. WorkspaceEventKind ) error {
299
300
publishWorkspaceUpdateCalled = true
300
301
return nil
301
302
},
@@ -339,7 +340,7 @@ func TestBatchCreateLogs(t *testing.T) {
339
340
},
340
341
Database : dbM ,
341
342
Log : slogtest .Make (t , nil ),
342
- PublishWorkspaceUpdateFn : func (ctx context.Context , wa * database.WorkspaceAgent ) error {
343
+ PublishWorkspaceUpdateFn : func (ctx context.Context , wa * database.WorkspaceAgent , kind wspubsub. WorkspaceEventKind ) error {
343
344
publishWorkspaceUpdateCalled = true
344
345
return nil
345
346
},
@@ -386,7 +387,7 @@ func TestBatchCreateLogs(t *testing.T) {
386
387
},
387
388
Database : dbM ,
388
389
Log : slogtest .Make (t , nil ),
389
- PublishWorkspaceUpdateFn : func (ctx context.Context , wa * database.WorkspaceAgent ) error {
390
+ PublishWorkspaceUpdateFn : func (ctx context.Context , wa * database.WorkspaceAgent , kind wspubsub. WorkspaceEventKind ) error {
390
391
publishWorkspaceUpdateCalled = true
391
392
return nil
392
393
},
0 commit comments