From 59cfd12ce5650279c99787da4a273db1e3253c76 Mon Sep 17 00:00:00 2001 From: Brenna N Epp Date: Wed, 7 Aug 2024 08:22:22 -0700 Subject: [PATCH] fix(storage): add retryalways policy to encryption test (#10644) Fixes #10567 --- storage/integration_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/storage/integration_test.go b/storage/integration_test.go index b5d445030e7e..941a534aa30e 100644 --- a/storage/integration_test.go +++ b/storage/integration_test.go @@ -2711,7 +2711,7 @@ func TestIntegration_Encryption(t *testing.T) { multiTransportTest(context.Background(), t, func(t *testing.T, ctx context.Context, bucket, _ string, client *Client) { h := testHelper{t} - obj := client.Bucket(bucket).Object("customer-encryption") + obj := client.Bucket(bucket).Object("customer-encryption").Retryer(WithPolicy(RetryAlways)) key := []byte("my-secret-AES-256-encryption-key") keyHash := sha256.Sum256(key) keyHashB64 := base64.StdEncoding.EncodeToString(keyHash[:]) @@ -2791,8 +2791,8 @@ func TestIntegration_Encryption(t *testing.T) { // We create 2 objects here and we can interleave operations to get around // the rate limit for object mutation operations (create, update, and delete). - obj2 := client.Bucket(bucket).Object("customer-encryption-2") - obj4 := client.Bucket(bucket).Object("customer-encryption-4") + obj2 := client.Bucket(bucket).Object("customer-encryption-2").Retryer(WithPolicy(RetryAlways)) + obj4 := client.Bucket(bucket).Object("customer-encryption-4").Retryer(WithPolicy(RetryAlways)) // Copying an object without the key should fail. if _, err := obj4.CopierFrom(obj).Run(ctx); err == nil { @@ -2825,7 +2825,7 @@ func TestIntegration_Encryption(t *testing.T) { if _, err := obj2.Key(key).CopierFrom(obj2.Key(key2)).Run(ctx); err != nil { t.Fatal(err) } - obj3 := client.Bucket(bucket).Object("customer-encryption-3") + obj3 := client.Bucket(bucket).Object("customer-encryption-3").Retryer(WithPolicy(RetryAlways)) // Composing without keys should fail. if _, err := obj3.ComposerFrom(obj, obj2).Run(ctx); err == nil { t.Fatal("want error, got nil") @@ -2846,7 +2846,7 @@ func TestIntegration_Encryption(t *testing.T) { // encrypted destination object. _, err := obj4.CopierFrom(obj2.Key(key)).Run(ctx) // unencrypt obj2 if err != nil { - t.Fatal(err) + t.Fatalf("Copier.Run: %v", err) } if _, err := obj3.Key(key).ComposerFrom(obj4).Run(ctx); err == nil { t.Fatal("got nil, want error")