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

Clean up tests for IAM Condition Support #169

@frankyn

Description

@frankyn

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)?

Metadata

Metadata

Labels

api: iamIssues related to the Identity and Access Management API.type: cleanupAn internal cleanup or hygiene concern.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions