-
Notifications
You must be signed in to change notification settings - Fork 87
test: add test to verify lifecycle.rule.condition.age_days = 0
#1846
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
test: add test to verify lifecycle.rule.condition.age_days = 0
#1846
Conversation
Zero (0) is a special value for some serialization configurations. Add a test to ensure it is properly passed to the backend, and is effective.
| } | ||
| conditionBuilder.setMatchesPrefix(condition.getMatchesPrefixList()); | ||
| conditionBuilder.setMatchesSuffix(condition.getMatchesSuffixList()); | ||
| if (!condition.getMatchesPrefixList().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.
this change looks out of context, is it needed as well?
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.
It's a difference between what is constructed via
LifecycleRule d1 =
new LifecycleRule(
LifecycleAction.newAbortIncompleteMPUploadAction(),
LifecycleCondition.newBuilder().setAge(0).build());
And what is decoded coming back from the service via grpc. By simply setting as we were doing before the value would be empty list rather than null. Apiary on the other hand will be null by default. This change brings these both in line with the apiary behavior.
…p/templates/java_library/.kokoro (#1846) build(deps): bump cryptography Bumps [cryptography](https://github.com/pyca/cryptography) from 41.0.2 to 41.0.3. - [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst) - [Commits](pyca/cryptography@41.0.2...41.0.3) --- updated-dependencies: - dependency-name: cryptography dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Burke Davison <[email protected]> Co-authored-by: Jeffrey Rennie <[email protected]> Co-authored-by: Alice <[email protected]> Source-Link: googleapis/synthtool@bfb4e63 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:11d59eabd49dc088f8339fb96e9da79ba4b3a73b3d49a8a4e0263e91edd053ba
…p/templates/java_library/.kokoro (#1846) (#2328) build(deps): bump cryptography Bumps [cryptography](https://github.com/pyca/cryptography) from 41.0.2 to 41.0.3. - [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst) - [Commits](pyca/cryptography@41.0.2...41.0.3) --- updated-dependencies: - dependency-name: cryptography dependency-type: indirect ... Source-Link: googleapis/synthtool@bfb4e63 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:11d59eabd49dc088f8339fb96e9da79ba4b3a73b3d49a8a4e0263e91edd053ba Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Burke Davison <[email protected]> Co-authored-by: Jeffrey Rennie <[email protected]> Co-authored-by: Alice <[email protected]> Co-authored-by: Sydney Munro <[email protected]>
Zero (0) is a special value for some serialization configurations. Add a test to ensure it is properly passed to the backend, and is effective.