-
Notifications
You must be signed in to change notification settings - Fork 5
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
Ensure resources aren't left running after test run #206
base: master
Are you sure you want to change the base?
Ensure resources aren't left running after test run #206
Conversation
144e7b2
to
c6bb95d
Compare
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.
Approving, but still need to wait on https://gitlab.com/saltstack/pop/pytest-pop/-/merge_requests/4
c6bb95d
to
22e0cd2
Compare
ignore this. |
Ignore me above... found the problem in pytest-pop, and it is fixed. 6.4 will have a fix for the ctx fixture, so cleaning up and pointing at 6.4 (yet to be cut). |
0860f88
to
f3e510f
Compare
* bump to pop 17 and acct 6 * fix the acct-v6 problem in pytest-pop, bump to new version (related https://gitlab.com/saltstack/pop/pytest-pop/-/merge_requests/4) * make resource_group fixture allocate the resource group instead of just creating a string * update resource group test since it is now a fixture * on shutdown of the test session, remove the resource group which should cascade to remove all resources in the group * move duplicated password fixture up to the common fixture config * mark some tests as expensive and document testing Signed-off-by: Tom Scanlan <[email protected]>
f3e510f
to
3a9d902
Compare
Looks like pytest-pop has been bumped. Tests are passing. |
What does this PR do?
Allocate the base resource_group as a fixture, and clean it up before exiting the test session resulting in removal of all test created resources.
Changes:
Signed-off-by: Tom Scanlan [email protected]
What issues does this PR fix or reference?
Fixes: #205 and #207
Previous Behavior
Previous resource_group fixture was a just the name of the group to create, and the creation was done in one of the first tests. Stopping the test run early would leave resources behind in this resource group, racking up $$.
New Behavior
Make the RG a fixture with a life for the entire session. Killing the test session should result in a clean up of everything in the resource group.
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to idem-azurerm require tests.
Commits signed with GPG?
No
Please review idem-azurerm's Contributing Guide for best practices.
See GitHub's page on GPG signing for more information about signing commits with GPG.