From e7d97b33994404222fc4fb5adce28aca40afb1f2 Mon Sep 17 00:00:00 2001 From: vsedmik <46570670+vsedmik@users.noreply.github.com> Date: Tue, 20 Feb 2024 21:40:12 +0100 Subject: [PATCH] ISS fix for CVV sorting issue (#14142) --- tests/foreman/cli/test_satellitesync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/foreman/cli/test_satellitesync.py b/tests/foreman/cli/test_satellitesync.py index 1ab6ef0cd40..dd80e98df8f 100644 --- a/tests/foreman/cli/test_satellitesync.py +++ b/tests/foreman/cli/test_satellitesync.py @@ -773,7 +773,7 @@ def test_positive_export_import_filtered_cvv( } ) exporting_cv = target_sat.cli.ContentView.info({'id': exporting_cv['id']}) - exporting_cvv_id = exporting_cv['versions'][0]['id'] + exporting_cvv_id = max(exporting_cv['versions'], key=lambda x: int(x['id']))['id'] # Check presence of 1 rpm due to filter export_packages = target_sat.cli.Package.list({'content-view-version-id': exporting_cvv_id}) assert len(export_packages) == 1