From 00ed21796e0c361891a50af7ef4f012a305254e1 Mon Sep 17 00:00:00 2001 From: Gaurav Talreja Date: Sat, 21 Oct 2023 03:32:16 +0530 Subject: [PATCH] Fix convert2rhel tests by CVV sort Signed-off-by: Gaurav Talreja --- tests/foreman/api/test_convert2rhel.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/foreman/api/test_convert2rhel.py b/tests/foreman/api/test_convert2rhel.py index ce2e78d85b2..026acb467bc 100644 --- a/tests/foreman/api/test_convert2rhel.py +++ b/tests/foreman/api/test_convert2rhel.py @@ -61,6 +61,7 @@ def update_cv(sat, cv, lce, repos): cv = sat.api.ContentView(id=cv.id, repository=repos).update(["repository"]) cv.publish() cv = cv.read() + cv.version.sort(key=lambda version: version.id) cv.version[-1].promote(data={'environment_ids': lce.id, 'force': False}) return cv