-
Notifications
You must be signed in to change notification settings - Fork 25
chore(docs): Securing tests against leaks. #139
Conversation
After long battle with GCE Enforcer that I described in #138 I came to conclusion that the only way to get this test to work for now is to use one of the existing subnetworks, so I did that. |
@googleapis/python-samples-owners please review, as this is blocking other PRs and makes sample tests leak VPC networks. |
wait_for_operation(op, PROJECT) | ||
try: | ||
image = image_client.get(project=PROJECT, image=image.name) | ||
request.cls.image = image |
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.
@m-strzelczyk Non-blocking question: What's the benefit of using fixtures at the class
scope instead of at the module
scope for these tests?
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's a bit faster. I don't create a new disk/image/snapshot for every test. As those are used in read-only way I can share them between the tests.
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.
Ah, sorry, didn't notice you mentioned module
scope. This would work as well, I just picked the class scope because I found the example for it :P
Fixes #138 🦕