Skip to content
This repository was archived by the owner on Dec 3, 2024. It is now read-only.

Commit 765f75b

Browse files
author
Rob Rati
committed
Fixed wrong var in error messages in tests
1 parent 1fce79d commit 765f75b

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

pkg/controller/bucket/bucket_controller_test.go

+9-9
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,13 @@ func TestAddValidProtocols(t *testing.T) {
162162
t.Errorf("expected %s, got %s", bucketName, in.BucketName)
163163
}
164164
if in.BucketContext["ServiceAccount"] != account {
165-
t.Errorf("expected %s, got %s", region, in.BucketContext["ServiceAccount"])
165+
t.Errorf("expected %s, got %s", account, in.BucketContext["ServiceAccount"])
166166
}
167167
if in.BucketContext["PrivateKeyName"] != keyName {
168-
t.Errorf("expected %s, got %s", region, in.BucketContext["PrivateKeyName"])
168+
t.Errorf("expected %s, got %s", keyName, in.BucketContext["PrivateKeyName"])
169169
}
170170
if in.BucketContext["ProjectID"] != projID {
171-
t.Errorf("expected %s, got %s", region, in.BucketContext["ProjectID"])
171+
t.Errorf("expected %s, got %s", projID, in.BucketContext["ProjectID"])
172172
}
173173
return &osspec.ProvisionerCreateBucketResponse{}, nil
174174
},
@@ -187,7 +187,7 @@ func TestAddValidProtocols(t *testing.T) {
187187
t.Errorf("expected %s, got %s", bucketName, in.BucketName)
188188
}
189189
if in.BucketContext["StorageAccount"] != account {
190-
t.Errorf("expected %s, got %s", region, in.BucketContext["StorageAccount"])
190+
t.Errorf("expected %s, got %s", account, in.BucketContext["StorageAccount"])
191191
}
192192
return &osspec.ProvisionerCreateBucketResponse{}, nil
193193
},
@@ -206,7 +206,7 @@ func TestAddValidProtocols(t *testing.T) {
206206
t.Errorf("expected %s, got %s", bucketName, in.BucketName)
207207
}
208208
if in.BucketContext["StorageAccount"] != account {
209-
t.Errorf("expected %s, got %s", region, in.BucketContext["StorageAccount"])
209+
t.Errorf("expected %s, got %s", account, in.BucketContext["StorageAccount"])
210210
}
211211
aMode := osspec.ProvisionerCreateBucketRequest_AnonymousBucketAccessMode(osspec.ProvisionerCreateBucketRequest_AnonymousBucketAccessMode_value[anonAccess])
212212
if in.AnonymousBucketAccessMode != aMode {
@@ -384,13 +384,13 @@ func TestDeleteValidProtocols(t *testing.T) {
384384
t.Errorf("expected %s, got %s", bucketName, in.BucketName)
385385
}
386386
if in.BucketContext["ServiceAccount"] != account {
387-
t.Errorf("expected %s, got %s", region, in.BucketContext["ServiceAccount"])
387+
t.Errorf("expected %s, got %s", account, in.BucketContext["ServiceAccount"])
388388
}
389389
if in.BucketContext["PrivateKeyName"] != keyName {
390-
t.Errorf("expected %s, got %s", region, in.BucketContext["PrivateKeyName"])
390+
t.Errorf("expected %s, got %s", keyName, in.BucketContext["PrivateKeyName"])
391391
}
392392
if in.BucketContext["ProjectID"] != projID {
393-
t.Errorf("expected %s, got %s", region, in.BucketContext["ProjectID"])
393+
t.Errorf("expected %s, got %s", projID, in.BucketContext["ProjectID"])
394394
}
395395
return &osspec.ProvisionerDeleteBucketResponse{}, nil
396396
},
@@ -409,7 +409,7 @@ func TestDeleteValidProtocols(t *testing.T) {
409409
t.Errorf("expected %s, got %s", bucketName, in.BucketName)
410410
}
411411
if in.BucketContext["StorageAccount"] != account {
412-
t.Errorf("expected %s, got %s", region, in.BucketContext["StorageAccount"])
412+
t.Errorf("expected %s, got %s", account, in.BucketContext["StorageAccount"])
413413
}
414414
return &osspec.ProvisionerDeleteBucketResponse{}, nil
415415
},

0 commit comments

Comments
 (0)