From bf84d3f98569af26daccfb98d942f9453c6669c5 Mon Sep 17 00:00:00 2001 From: Satellite QE <115476073+Satellite-QE@users.noreply.github.com> Date: Tue, 20 Feb 2024 16:02:48 -0500 Subject: [PATCH] [6.14.z] ISS fix for CVV sorting issue (#14146) --- 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 af81b632a5a..225a834fcbb 100644 --- a/tests/foreman/cli/test_satellitesync.py +++ b/tests/foreman/cli/test_satellitesync.py @@ -772,7 +772,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