mirror of
https://github.com/ansible/awx.git
synced 2026-03-10 05:59:28 -02:30
fix: narrow vendor_collections_dir fixture teardown scope (#16326)
Only remove the collection directory the fixture created (redhat/indirect_accounting) instead of the entire /var/lib/awx/vendor_collections/ root, so we don't accidentally delete vendor collections that may have been installed by the build process. Forward-port of ansible/tower#7350. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -111,8 +111,8 @@ def vendor_collections_dir():
|
|||||||
|
|
||||||
yield base
|
yield base
|
||||||
|
|
||||||
# Cleanup
|
# Cleanup: only remove the collection we created, not the entire vendor root
|
||||||
shutil.rmtree(VENDOR_COLLECTIONS_BASE, ignore_errors=True)
|
shutil.rmtree(base, ignore_errors=True)
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(autouse=True)
|
@pytest.fixture(autouse=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user