Skip to content

tests(monitoring): normalize VPCSC configuration in systests - #9615

Merged
tseaver merged 5 commits into
googleapis:masterfrom
tseaver:9580-monitoring-normalize-spcsc-config
Nov 12, 2019
Merged

tests(monitoring): normalize VPCSC configuration in systests#9615
tseaver merged 5 commits into
googleapis:masterfrom
tseaver:9580-monitoring-normalize-spcsc-config

Conversation

@tseaver

Copy link
Copy Markdown
Contributor

Toward #9580.

- Use 'vpcsc_config' for VPCSC environment, skipping.
- Skip VPCSC-only tests at class scope.
- Split '_is_rejected' to avoid 'list()' call for APIs not returning iterators.
- Remove never-reached branch in '_do_test'.
- Avoid swallowing unexpected exceptions in '_is_rejected'.
@tseavertseaver added testing api: monitoring Issues related to the Cloud Monitoring API. labels Nov 6, 2019
@googlebotgooglebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 6, 2019
@tseavertseaver added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Nov 6, 2019
@tseaver

Copy link
Copy Markdown
ContributorAuthor

I tagged with "do not merge" because I believe we should refactor all these un-idiomatic tests along the lines of the changes in #9618.

Comment threadmonitoring/tests/system/test_vpcsc_v3.py
@tseavertseaver removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Nov 12, 2019
@tseaver

Copy link
Copy Markdown
ContributorAuthor

@busunkim96 I removed the "do not merge" label after updating the tests to follow the pattern in #9618.

@busunkim96busunkim96 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for fixing all the VPCSC tests!

@busunkim96

Copy link
Copy Markdown
Contributor

Looks like one of the test files needs to be blackened:

black --check google tests docs
would reformat /tmpfs/src/github/google-cloud-python/monitoring/tests/system/test_vpcsc_v3.py
Oh no! 💥 💔 💥
1 file would be reformatted, 64 files would be left unchanged.
Command black --check google tests docs failed with exit code 1
Session lint failed.

@tseaver
tseaver merged commit 505d553 into googleapis:masterNov 12, 2019
@steinwaywhw

Copy link
Copy Markdown
Contributor

Hi @tseaver shall we have a GVC? These tests are auto generated, not authored by human. The next test refresh will override any manual refactoring you've done.

@busunkim96

Copy link
Copy Markdown
Contributor

Hi @steinwaywhw, I believe your team maintains a script to make these tests? It'd be best for your generator to produce tests that look close to the present format (looking for the actual error that will be raised). The other VPCSC tests have also been changed to use this format.

Feel free to put something on my calendar if you would like to chat further.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: monitoringIssues related to the Cloud Monitoring API.cla: yesThis human has signed the Contributor License Agreement.testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@tseaver@busunkim96@steinwaywhw@googlebot