test(storage): enable more grpc integration tests
@@ -690,11 +690,9 @@ func TestIntegration_BucketPolicyOnly(t *testing.T) {
}
func TestIntegration_UniformBucketLevelAccess(t *testing.T) {
- ctx := context.Background()
- client := testConfig(ctx, t)
- defer client.Close()
+ multiTransportTest(context.Background(), t, func(t *testing.T, ctx context.Context, _ string, prefix string, client *Client) {
h := testHelper{t}
- bkt := client.Bucket(uidSpace.New())
+ bkt := client.Bucket(prefix + uidSpace.New())
h.mustCreate(bkt, testutil.ProjID(), nil)
defer h.mustDeleteBucket(bkt)
@@ -763,16 +761,15 @@ func TestIntegration_UniformBucketLevelAccess(t *testing.T) {
if !containsACLRule(acl, entityRoleACL{aclEntity, RoleReader}) {
t.Errorf("containsACL: expected ACL %v to include custom ACL entity %v", acl, entityRoleACL{aclEntity, RoleReader})
}
+ })
}
func TestIntegration_PublicAccessPrevention(t *testing.T) {
- ctx := context.Background()
- client := testConfig(ctx, t)
- defer client.Close()
+ multiTransportTest(context.Background(), t, func(t *testing.T, ctx context.Context, _ string, prefix string, client *Client) {
h := testHelper{t}
// Create a bucket with PublicAccessPrevention enforced.
- bkt := client.Bucket(uidSpace.New())
+ bkt := client.Bucket(prefix + uidSpace.New())
h.mustCreate(bkt, testutil.ProjID(), &BucketAttrs{PublicAccessPrevention: PublicAccessPreventionEnforced})
defer h.mustDeleteBucket(bkt)
@@ -825,7 +822,7 @@ func TestIntegration_PublicAccessPrevention(t *testing.T) {
ctxWithTimeout, cancelCtx := context.WithTimeout(ctx, time.Second*10)
a = o.Retryer(WithErrorFunc(idempotentOrNilRetry)).ACL()
- a.Set(ctxWithTimeout, AllUsers, RoleReader)
+ err = a.Set(ctxWithTimeout, AllUsers, RoleReader)
cancelCtx()
if err != nil {
t.Errorf("ACL.Set: making object public failed: %v", err)
@@ -854,6 +851,7 @@ func TestIntegration_PublicAccessPrevention(t *testing.T) {
if attrs.PublicAccessPrevention != PublicAccessPreventionInherited {
t.Errorf("updating UBLA: got %s, want %s", attrs.PublicAccessPrevention, PublicAccessPreventionInherited)
}
+ })
}
func TestIntegration_ConditionalDelete(t *testing.T) {
