-
Notifications
You must be signed in to change notification settings - Fork 2.9k
IAM: Add access code snippets and tests #1597
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
IAM: Add access code snippets and tests #1597
Conversation
iam/api-client/src/main/java/com/google/iam/snippets/AddMember.java
Outdated
Show resolved
Hide resolved
lesv
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.
PTAL
It's idiomatic to throw errors, just annotate your methods so its known, unless you are actually doing something.
Regarding submitting too much. I use a tool like Github Desktop and my flow is:
- Sync to head on master
- create a new branch and switch to it.
- write modify code
- commit
- push to github
- check
- create a PR
- modify for feedback
- commit
- push
Once there is an approval:
- switch to master and sync
- delete the prior branch
- create a new branch for further work.
iam/api-client/src/main/java/com/google/iam/snippets/AddMember.java
Outdated
Show resolved
Hide resolved
iam/api-client/src/main/java/com/google/iam/snippets/GetPolicy.java
Outdated
Show resolved
Hide resolved
iam/api-client/src/main/java/com/google/iam/snippets/RemoveMember.java
Outdated
Show resolved
Hide resolved
| } catch (IOException | GeneralSecurityException e) { | ||
| System.out.println("Unable to initialize service: \n" + e.toString()); | ||
| return; | ||
| } |
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.
not idiomatic
iam/api-client/src/test/java/com/google/iam/snippets/AccessTests.java
Outdated
Show resolved
Hide resolved
|
@lesv Any idea why the checks are still pending? |
|
@dpebot merge when green |
|
Okay! I'll merge when all statuses are green and all reviewers approve. |
|
@kurtisvg I was trying to remove you from the reviewer list and accidentally requested your review. |
|
I don't know how it's failing if the only thing that's been changed was merging in the master branch |
|
|
Ah, thank you! |
Added access code snippets and tests for these docs:
https://cloud.google.com/iam/docs/granting-changing-revoking-access
https://cloud.google.com/iam/docs/testing-permissions
(I don't know how to not include previously merged commits, so please forgive the slight clutter)