Skip to content

Commit

Permalink
[6.15.z] Reorder finalizers in CV upgrade test (#15201)
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 01cfd35 commit 1a84977
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 1a84977

Please sign in to comment.