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

Clean up tests for IAM Condition Support #169

Closed
frankyn opened this issue Feb 27, 2020 · 0 comments · Fixed by #224
Closed

Clean up tests for IAM Condition Support #169

frankyn opened this issue Feb 27, 2020 · 0 comments · Fixed by #224
Assignees
Labels
api: iam Issues related to the Identity and Access Management API. type: cleanup An internal cleanup or hygiene concern.

Comments

@frankyn
Copy link
Member

frankyn commented Feb 27, 2020

Remaining clean up from PR #110
From: @netdpb
File: google-cloud-core/src/test/java/com/google/cloud/PolicyV3Test.java

You're calling a static method on an instance, and throwing the instance away. That's not what you want to do. (If the project used Error-Prone, this would have generated a warning.)

It looks like you want a variant of BINDINGS_NO_CONDITIONS where the viewer role has a condition. What about this?

ImmutableList.of(
    BINDINGS_NO_CONDITIONS.get(0).toBuilder().setCondition(...).build(),
    BINDINGS_NO_CONDITIONS.get(1))
Although it might be nice to have a constant for each element of BINDINGS_NO_CONDITIONS (VIEWER and EDITOR)?
@frankyn frankyn added type: cleanup An internal cleanup or hygiene concern. api: iam Issues related to the Identity and Access Management API. labels Feb 27, 2020
@frankyn frankyn self-assigned this Feb 27, 2020
@athakor athakor self-assigned this May 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: iam Issues related to the Identity and Access Management API. type: cleanup An internal cleanup or hygiene concern.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants