mirror of
https://github.com/ansible/awx.git
synced 2026-02-25 23:16:01 -03:30
Cleanup in-memory data from test that randomly causes other failures (#15716)
This commit is contained in:
@@ -31,8 +31,15 @@ def test_apply_new_instance_id(inventory_source):
|
|||||||
assert host2.instance_id == 'bad_user'
|
assert host2.instance_id == 'bad_user'
|
||||||
|
|
||||||
|
|
||||||
|
def cleanup_cloudforms():
|
||||||
|
if 'cloudforms' in ManagedCredentialType.registry:
|
||||||
|
del ManagedCredentialType.registry['cloudforms']
|
||||||
|
assert 'cloudforms' not in CredentialType.defaults
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.django_db
|
@pytest.mark.django_db
|
||||||
def test_cloudforms_inventory_removal(inventory):
|
def test_cloudforms_inventory_removal(request, inventory):
|
||||||
|
request.addfinalizer(cleanup_cloudforms)
|
||||||
ManagedCredentialType(
|
ManagedCredentialType(
|
||||||
name='Red Hat CloudForms',
|
name='Red Hat CloudForms',
|
||||||
namespace='cloudforms',
|
namespace='cloudforms',
|
||||||
|
|||||||
Reference in New Issue
Block a user