Skip to content

Commit 91cbe67

Browse files
authored
chore: move notiffake to testutil (coder#13933)
1 parent fbd1d7f commit 91cbe67

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

coderd/autobuild/lifecycle_executor_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import (
1818
"github.com/coder/coder/v2/coderd/coderdtest"
1919
"github.com/coder/coder/v2/coderd/database"
2020
"github.com/coder/coder/v2/coderd/database/dbauthz"
21-
"github.com/coder/coder/v2/coderd/notifications/notiffake"
2221
"github.com/coder/coder/v2/coderd/schedule"
2322
"github.com/coder/coder/v2/coderd/schedule/cron"
2423
"github.com/coder/coder/v2/coderd/util/ptr"
@@ -116,7 +115,7 @@ func TestExecutorAutostartTemplateUpdated(t *testing.T) {
116115
tickCh = make(chan time.Time)
117116
statsCh = make(chan autobuild.Stats)
118117
logger = slogtest.Make(t, &slogtest.Options{IgnoreErrors: !tc.expectStart}).Leveled(slog.LevelDebug)
119-
enqueuer = notiffake.FakeNotificationEnqueuer{}
118+
enqueuer = testutil.FakeNotificationEnqueuer{}
120119
client = coderdtest.New(t, &coderdtest.Options{
121120
AutobuildTicker: tickCh,
122121
IncludeProvisionerDaemon: true,

coderd/coderdtest/coderdtest.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ import (
6565
"github.com/coder/coder/v2/coderd/gitsshkey"
6666
"github.com/coder/coder/v2/coderd/httpmw"
6767
"github.com/coder/coder/v2/coderd/notifications"
68-
"github.com/coder/coder/v2/coderd/notifications/notiffake"
6968
"github.com/coder/coder/v2/coderd/rbac"
7069
"github.com/coder/coder/v2/coderd/schedule"
7170
"github.com/coder/coder/v2/coderd/telemetry"
@@ -243,7 +242,7 @@ func NewOptions(t testing.TB, options *Options) (func(http.Handler), context.Can
243242
}
244243

245244
if options.NotificationsEnqueuer == nil {
246-
options.NotificationsEnqueuer = new(notiffake.FakeNotificationEnqueuer)
245+
options.NotificationsEnqueuer = new(testutil.FakeNotificationEnqueuer)
247246
}
248247

249248
accessControlStore := &atomic.Pointer[dbauthz.AccessControlStore]{}

coderd/notifications/notiffake/notiffake.go renamed to testutil/notifications.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package notiffake
1+
package testutil
22

33
import (
44
"context"

0 commit comments

Comments
 (0)