-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add ITComputeTest test for resource name #4417
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
|
How do i format the code? |
|
I think its |
|
@igorbernstein2 No luck, the tool returns success without changing any files. I've also run synthtool just for the formatting and that hasn't changed anything. |
|
@kolea2 Is there anything else I can do to fix the formatting on the diff? |
|
Hey @andreamlin! I locally ran 'mvn com.coveo:fmt-maven-plugin:format' on your branch and it reformatted the file for me - looks like there are some unused imports and it reformatted a comment. Let me know if you need help getting it to work or I can try to push my changes as well. |
…ud-java into test_resource_name
Codecov Report
@@ Coverage Diff @@
## master #4417 +/- ##
=========================================
Coverage ? 48.52%
Complexity ? 20742
=========================================
Files ? 2077
Lines ? 203081
Branches ? 23294
=========================================
Hits ? 98547
Misses ? 96458
Partials ? 8076Continue to review full report at Codecov.
|
|
@kolea2 Thanks for the fix! Would you mind reviewing? |
| return; | ||
| } | ||
|
|
||
| fail(); |
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.
Can we add a message explaining why it failed?
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.
Done.
| // problem. | ||
| assertThat(e.getMessage()).contains("Bad Request"); | ||
| assertThat(e.getCause().getMessage()) | ||
| .doesNotContain("Invalid value for field 'resource.machineType'"); |
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.
My only concern here is that if the error message ever changes, this would still pass. Can we instead assert what the error message actually is?
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.
Done!
| } | ||
|
|
||
| @Test | ||
| public void testInsertInstance() { |
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 test that asserts a successfully inserted instance?
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'll be in https://github.com/googleapis/google-cloud-java/pull/4420/files#diff-72d767a100f949c4606b04bb6820a8feR248. That is blocked on an LRO implementation tho.
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.
So this should be fine for now, and a later PR will test inserting an instance.
|
Fixed up comments. PTAL |
For testing #4416.
This test won't pass until artman is updated with googleapis/gapic-generator#2529 and the clients are refreshed.Edit: blockers are gone