Skip to content

Commit

Permalink
Reorder finalizers in CV upgrade test
Browse files Browse the repository at this point in the history
  • Loading branch information
vsedmik committed May 27, 2024
1 parent 04d4fb0 commit 19d9929
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/upgrades/test_contentview.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ def test_cv_postupgrade_scenario(self, request, target_sat, pre_upgrade_data):
cv = target_sat.api.ContentView(organization=org.id).search(
query={'search': f'name="{cv_name}"'}
)[0]
request.addfinalizer(cv.delete)
yum_repo = target_sat.api.Repository(organization=org.id).search(
query={'search': f'name="{pre_test_name}_yum_repo"'}
)[0]
Expand All @@ -97,6 +96,7 @@ def test_cv_postupgrade_scenario(self, request, target_sat, pre_upgrade_data):
query={'search': f'name="{pre_test_name}_file_repo"'}
)[0]
request.addfinalizer(file_repo.delete)
request.addfinalizer(cv.delete) # the order matters
cv.repository = []
cv.update(['repository'])
assert len(cv.read_json()['repositories']) == 0
Expand Down

0 comments on commit 19d9929

Please sign in to comment.