-
Notifications
You must be signed in to change notification settings - Fork 371
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
Refactor test_create, test_proxy, and test_env for test isolation #2416
Conversation
|
||
|
||
def test_register_new_env(tmp_home, tmp_root_prefix): | ||
helpers.create("-n", "env2", "--json", no_dry_run=True) |
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 remove the created test environments after the tests are done? It was handled by the teardown_class
before... (This applies wherever create
is used)
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.
This is handled by the tmp_root_prefix
fixture that sets a temporary root prefix for all environments.
It is created under temporary storage, independent for each test, and safely cleaned up afterwards.
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.
Hmm yes, but it's not the case for the explicitly created envs env2
, env3
, etc. Is it?
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.
Oh ok I see, you mean that deleting the tmp_root_prefix
deletes implicitely everything... ok!
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.
Yes exactly, the whole root_prefix is deleting, deleting everything with it
Big PR, sorry. Basically it uses the new fixture to create temporary root_prefix and home directory inside a /tmp folder.