From ade62d7671122d0ea095908f94ee906d79af3690 Mon Sep 17 00:00:00 2001 From: Satellite QE <115476073+Satellite-QE@users.noreply.github.com> Date: Tue, 28 May 2024 10:18:44 -0400 Subject: [PATCH] [6.12.z] Reorder finalizers in CV upgrade test (#15200) Reorder finalizers in CV upgrade test (#15185) (cherry picked from commit 85b43ff7771a1a7611038d543f2b3587401cd67d) Co-authored-by: vsedmik <46570670+vsedmik@users.noreply.github.com> --- tests/upgrades/test_contentview.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/upgrades/test_contentview.py b/tests/upgrades/test_contentview.py index 537ea003e03..b0000bced8a 100644 --- a/tests/upgrades/test_contentview.py +++ b/tests/upgrades/test_contentview.py @@ -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] @@ -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