Skip to content

Commit

Permalink
[6.13.z] Reorder finalizers in CV upgrade test (#15198)
Browse files Browse the repository at this point in the history
Reorder finalizers in CV upgrade test (#15185)

(cherry picked from commit 85b43ff)

Co-authored-by: vsedmik <[email protected]>
  • Loading branch information
Satellite-QE and vsedmik authored May 28, 2024
1 parent bd84d19 commit ff3ca89
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 - addfinalizer works like a stack/LIFO
cv.repository = []
cv.update(['repository'])
assert len(cv.read_json()['repositories']) == 0
Expand Down

0 comments on commit ff3ca89

Please sign in to comment.