Skip to content

Commit 58d4055

Browse files
authored
test(storage): unflake PublicAccessPrevention test (#4352)
This needs a retry to account for propagation time for bucket ACLs. Fixes #4351
1 parent 7aa0e19 commit 58d4055

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

storage/integration_test.go

+8-3
Original file line numberDiff line numberDiff line change
@@ -627,9 +627,14 @@ func TestIntegration_PublicAccessPrevention(t *testing.T) {
627627
t.Error("updating PublicAccessPrevention changed UBLA setting")
628628
}
629629

630-
// Now, making object public or making bucket public should succeed.
631-
a = o.ACL()
632-
if err := a.Set(ctx, AllUsers, RoleReader); err != nil {
630+
// Now, making object public or making bucket public should succeed. Run with
631+
// retry because ACL settings may take time to propagate.
632+
if err := retry(ctx,
633+
func() error {
634+
a = o.ACL()
635+
return a.Set(ctx, AllUsers, RoleReader)
636+
},
637+
nil); err != nil {
633638
t.Errorf("ACL.Set: making object public failed: %v", err)
634639
}
635640
policy, err = bkt.IAM().V3().Policy(ctx)

0 commit comments

Comments
 (0)