From 8a0c388a96e9e84cad017cf0ec858c2a8643d6f5 Mon Sep 17 00:00:00 2001 From: David Kanney Date: Tue, 19 Aug 2025 13:05:38 -0400 Subject: [PATCH] test(grants): Use 'continue' when iterating over expected outputs (#5981) --- .../daemon/controller/handlers/authmethods/grants_test.go | 2 +- .../daemon/controller/handlers/managed_groups/grants_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/daemon/controller/handlers/authmethods/grants_test.go b/internal/daemon/controller/handlers/authmethods/grants_test.go index c3d6af8d77..28a19ff4e3 100644 --- a/internal/daemon/controller/handlers/authmethods/grants_test.go +++ b/internal/daemon/controller/handlers/authmethods/grants_test.go @@ -1003,7 +1003,7 @@ func TestGrants_Update(t *testing.T) { }) if expectedOutput.wantErr != nil { require.ErrorIs(t, err, expectedOutput.wantErr) - return + continue } require.NoError(t, err) handlers.TestAssertOutputFields(t, resp.Item, expectedOutput.wantOutfields) diff --git a/internal/daemon/controller/handlers/managed_groups/grants_test.go b/internal/daemon/controller/handlers/managed_groups/grants_test.go index 3f48a7805c..39f242f318 100644 --- a/internal/daemon/controller/handlers/managed_groups/grants_test.go +++ b/internal/daemon/controller/handlers/managed_groups/grants_test.go @@ -837,7 +837,7 @@ func TestGrants_WriteActions(t *testing.T) { got, err := s.CreateManagedGroup(fullGrantAuthCtx, item) if wantErr != nil { require.ErrorIs(t, err, wantErr) - return + continue } require.NoError(t, err) require.NotNil(t, got) @@ -982,7 +982,7 @@ func TestGrants_WriteActions(t *testing.T) { got, err := s.CreateManagedGroup(fullGrantAuthCtx, item) if wantErr != nil { require.ErrorIs(t, err, wantErr) - return + continue } require.NoError(t, err) require.NotNil(t, got)