Skip to content

Commit

Permalink
fix(storage): add retryalways policy to encryption test (#10644)
Browse files Browse the repository at this point in the history
Fixes #10567
  • Loading branch information
BrennaEpp authored Aug 7, 2024
1 parent 3c8e88a commit 59cfd12
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions storage/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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[:])
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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")
Expand All @@ -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")
Expand Down

0 comments on commit 59cfd12

Please sign in to comment.