Skip to content

Commit

Permalink
Restore len asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-jmichalak committed May 22, 2024
1 parent 43379a7 commit a8e8007
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/sdk/testint/grants_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,7 @@ func TestInt_GrantAndRevokePrivilegesToDatabaseRole(t *testing.T) {
})
require.NoError(t, err)
// Expecting two grants because database role has usage on database by default
require.LessOrEqual(t, 2, len(returnedGrants))
usagePrivilege, err := collections.FindOne[sdk.Grant](returnedGrants, func(g sdk.Grant) bool { return g.Privilege == sdk.AccountObjectPrivilegeUsage.String() })
require.NoError(t, err)
assert.Equal(t, sdk.ObjectTypeDatabaseRole, usagePrivilege.GrantedTo)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ func TestInt_RowAccessPolicies(t *testing.T) {
showRequest := sdk.NewShowRowAccessPolicyRequest()
returnedRowAccessPolicies, err := client.RowAccessPolicies.Show(ctx, showRequest)
require.NoError(t, err)

require.LessOrEqual(t, 2, len(returnedRowAccessPolicies))
assert.Contains(t, returnedRowAccessPolicies, *rowAccessPolicy1)
assert.Contains(t, returnedRowAccessPolicies, *rowAccessPolicy2)
})
Expand Down

0 comments on commit a8e8007

Please sign in to comment.