Browse Source

fix: assert UpdateGroup HTTP status in disabled group tests

Add require.Equal checks for 200 status after UpdateGroup calls
so the test fails immediately on API errors rather than relying
on the subsequent Eventually timeout.
pull/8560/head
Chris Lu 21 hours ago
parent
commit
0add8c58f5
  1. 2
      test/s3/iam/s3_iam_group_test.go

2
test/s3/iam/s3_iam_group_test.go

@ -520,6 +520,7 @@ func TestIAMGroupDisabledPolicyEnforcement(t *testing.T) {
})
require.NoError(t, err)
defer resp.Body.Close()
require.Equal(t, http.StatusOK, resp.StatusCode, "UpdateGroup (disable) should return 200")
// Wait for propagation — user should be denied
require.Eventually(t, func() bool {
@ -538,6 +539,7 @@ func TestIAMGroupDisabledPolicyEnforcement(t *testing.T) {
})
require.NoError(t, err)
defer resp.Body.Close()
require.Equal(t, http.StatusOK, resp.StatusCode, "UpdateGroup (re-enable) should return 200")
// Wait for propagation — user should have access again
require.Eventually(t, func() bool {

Loading…
Cancel
Save