Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(storage): add retryalways policy to encryption test #10644

Merged
merged 2 commits into from
Aug 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading