-
Notifications
You must be signed in to change notification settings - Fork 89
test: enable gRPC config for ITAccessTest #1699
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
Conversation
BenWhitehead
commented
Oct 10, 2022
- fix: fixup ITAccessTest#testRetentionPolicyNoLock to pass for gRPC
- fix: fixup ITAccessTest#testUBLAWithPublicAccessPreventionOnBucket to pass for gRPC
- chore(test): fixup ITAccessTest generic acl and default acl tests to only run for JSON
- fix: fixup ITAccessTest related to Bucket IAM Policy
- chore(test): set ITAccessTest#testBucketWithBucketPolicyOnlyEnabled to json only
- chore(test): set ITAccessTest#testBucketWithUniformBucketLevelAccessEnabled to json only
- chore: fmt
- fix: fixup ITAccessTest#testEnableAndDisableBucketPolicyOnlyOnExistingBucket to work with grpc instance
- fix: fixup ITAccessTest#testEnableAndDisableUniformBucketLevelAccessOnExistingBucket to work with grpc instance
- fix: fixup ITAccessTest#testEnforcedPublicAccessPreventionOnBucket to work with grpc instance
- fix: fixup ITAccessTest#testUnspecifiedPublicAccessPreventionOnBucket to work with grpc instance
Introduce TemporaryBucket to provide an AutoClosable bucket which will cleanup on close
… pass for gRPC Split test into two different tests to cover each of the scenarios: 1. changingPAPDoesNotAffectUBLA 2. changingUBLADoesNotAffectPAP
…only run for JSON * bucketAcl_requesterPays_false * bucketAcl_requesterPays_true * testBlobAcl * testBucketDefaultAcl
* testBucketPolicyV1 * testBucketPolicyV1RequesterPays * testBucketPolicyV3 Add IamPolicyPropertyTest and corresponding provider.
…nabled to json only
…gBucket to work with grpc instance
…nExistingBucket to work with grpc instance
… work with grpc instance
… to work with grpc instance
google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITAccessTest.java
Outdated
Show resolved
Hide resolved
|
|
||
| @Test | ||
| public void bucketAcl_requesterPays_true() { | ||
| assumeTrue(clientName.startsWith("JSON")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have a bug for this? if not a comment on the reasoning for turning these tests off.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are currently skipped due to the acl related operations not yet being implemented for GrpcStorageImpl, we've got tracking tasks for each of those operations which I feel cover these tests.
| .collect(ImmutableList.toImmutableList()); | ||
| to.setBindings(bindings); | ||
| List<com.google.iam.v1.Binding> bindingsList = from.getBindingsList(); | ||
| if (!bindingsList.isEmpty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are a few other lists where isEmpty is without a null check first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, protobuf will never return a null value to us, so we will always get a list of zero or more values.
This same behavior, however does not hold for apiary side of things. The json libraries will both return null if the element is null or undefined. So we need to guard coming out of apiary always.
Our model classes, are unfortunately inconsistent in their nullability handling and we should generally err on the side of null values being possible coming out. I'd like to make this more uniform, but it'll have to wait for a major version boundary.
sydney-munro
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM