chore: use idiomatic test setup in notification tests (#14416)

This commit is contained in:
Danny Kopping
2024-08-23 16:29:27 +02:00
committed by GitHub
parent d4adfa3902
commit a4d785dec5
6 changed files with 187 additions and 185 deletions
+7 -7
View File
@@ -115,7 +115,7 @@ func TestNotificationPreferences(t *testing.T) {
t.Run("Initial state", func(t *testing.T) {
t.Parallel()
ctx := testutil.Context(t, testutil.WaitLong)
ctx := testutil.Context(t, testutil.WaitSuperLong)
api := coderdtest.New(t, createOpts(t))
firstUser := coderdtest.CreateFirstUser(t, api)
@@ -133,7 +133,7 @@ func TestNotificationPreferences(t *testing.T) {
t.Run("Insufficient permissions", func(t *testing.T) {
t.Parallel()
ctx := testutil.Context(t, testutil.WaitLong)
ctx := testutil.Context(t, testutil.WaitSuperLong)
api := coderdtest.New(t, createOpts(t))
firstUser := coderdtest.CreateFirstUser(t, api)
@@ -156,7 +156,7 @@ func TestNotificationPreferences(t *testing.T) {
t.Run("Admin may read any users' preferences", func(t *testing.T) {
t.Parallel()
ctx := testutil.Context(t, testutil.WaitLong)
ctx := testutil.Context(t, testutil.WaitSuperLong)
api := coderdtest.New(t, createOpts(t))
firstUser := coderdtest.CreateFirstUser(t, api)
@@ -174,7 +174,7 @@ func TestNotificationPreferences(t *testing.T) {
t.Run("Admin may update any users' preferences", func(t *testing.T) {
t.Parallel()
ctx := testutil.Context(t, testutil.WaitLong)
ctx := testutil.Context(t, testutil.WaitSuperLong)
api := coderdtest.New(t, createOpts(t))
firstUser := coderdtest.CreateFirstUser(t, api)
@@ -202,7 +202,7 @@ func TestNotificationPreferences(t *testing.T) {
t.Run("Add preferences", func(t *testing.T) {
t.Parallel()
ctx := testutil.Context(t, testutil.WaitLong)
ctx := testutil.Context(t, testutil.WaitSuperLong)
api := coderdtest.New(t, createOpts(t))
firstUser := coderdtest.CreateFirstUser(t, api)
@@ -230,7 +230,7 @@ func TestNotificationPreferences(t *testing.T) {
t.Run("Modify preferences", func(t *testing.T) {
t.Parallel()
ctx := testutil.Context(t, testutil.WaitLong)
ctx := testutil.Context(t, testutil.WaitSuperLong)
api := coderdtest.New(t, createOpts(t))
firstUser := coderdtest.CreateFirstUser(t, api)
@@ -305,7 +305,7 @@ func TestNotificationDispatchMethods(t *testing.T) {
t.Run(tc.name, func(t *testing.T) {
t.Parallel()
ctx := testutil.Context(t, testutil.WaitShort)
ctx := testutil.Context(t, testutil.WaitSuperLong)
api := coderdtest.New(t, tc.opts)
_ = coderdtest.CreateFirstUser(t, api)