Skip to content

Commit

Permalink
Merge branch 'posturechecks-get-account-refactoring' into policy-get-…
Browse files Browse the repository at this point in the history
…account-refactoring
  • Loading branch information
bcmmbaga committed Nov 12, 2024
2 parents 32d1b2d + bbaee18 commit 50e6389
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions management/server/sql_store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1596,17 +1596,17 @@ func TestSqlStore_GetPostureChecksByID(t *testing.T) {

for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
peer, err := store.GetPostureChecksByID(context.Background(), LockingStrengthShare, accountID, tt.postureChecksID)
postureChecks, err := store.GetPostureChecksByID(context.Background(), LockingStrengthShare, accountID, tt.postureChecksID)
if tt.expectError {
require.Error(t, err)
sErr, ok := status.FromError(err)
require.True(t, ok)
require.Equal(t, sErr.Type(), status.NotFound)
require.Nil(t, peer)
require.Nil(t, postureChecks)
} else {
require.NoError(t, err)
require.NotNil(t, peer)
require.Equal(t, tt.postureChecksID, peer.ID)
require.NotNil(t, postureChecks)
require.Equal(t, tt.postureChecksID, postureChecks.ID)
}
})
}
Expand Down

0 comments on commit 50e6389

Please sign in to comment.