From c9b442e375f93481333e44628ad56994a5fa37b1 Mon Sep 17 00:00:00 2001 From: Peter Ondrejka Date: Wed, 5 Feb 2025 14:03:02 +0100 Subject: [PATCH 1/3] assertion skip for SAT-30898 --- tests/foreman/cli/test_remoteexecution.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/foreman/cli/test_remoteexecution.py b/tests/foreman/cli/test_remoteexecution.py index 086355b277..7138cde929 100644 --- a/tests/foreman/cli/test_remoteexecution.py +++ b/tests/foreman/cli/test_remoteexecution.py @@ -28,6 +28,7 @@ from robottelo.exceptions import CLIFactoryError from robottelo.utils import ohsnap from robottelo.utils.datafactory import filtered_datapoint, parametrized +from robottelo.utils.issue_handlers import is_open @filtered_datapoint @@ -344,7 +345,10 @@ def test_positive_run_job_effective_user( 'organization-id': module_org.id, } ) - assert 'Permission denied' in out + if not ( + rex_contenthost.os_distribution_version.split(".")[0] == '7' and is_open('SAT-30898') + ): + assert 'Permission denied' in out @pytest.mark.tier3 @pytest.mark.parametrize( From 204d7cd62e2479a57628f1efcbe5a2e339db4007 Mon Sep 17 00:00:00 2001 From: Peter Ondrejka Date: Thu, 6 Feb 2025 09:57:32 +0100 Subject: [PATCH 2/3] Update tests/foreman/cli/test_remoteexecution.py Co-authored-by: Gaurav Talreja --- tests/foreman/cli/test_remoteexecution.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/foreman/cli/test_remoteexecution.py b/tests/foreman/cli/test_remoteexecution.py index 7138cde929..f09f9b2248 100644 --- a/tests/foreman/cli/test_remoteexecution.py +++ b/tests/foreman/cli/test_remoteexecution.py @@ -345,9 +345,7 @@ def test_positive_run_job_effective_user( 'organization-id': module_org.id, } ) - if not ( - rex_contenthost.os_distribution_version.split(".")[0] == '7' and is_open('SAT-30898') - ): + if not rex_contenthost.os_version.major == 7 and is_open('SAT-30898'): assert 'Permission denied' in out @pytest.mark.tier3 From cffeee86876e2e20ae458bf8f2f50e09eda55a7e Mon Sep 17 00:00:00 2001 From: Peter Ondrejka Date: Fri, 7 Feb 2025 11:03:11 +0100 Subject: [PATCH 3/3] Update tests/foreman/cli/test_remoteexecution.py Co-authored-by: vsedmik <46570670+vsedmik@users.noreply.github.com> --- tests/foreman/cli/test_remoteexecution.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/foreman/cli/test_remoteexecution.py b/tests/foreman/cli/test_remoteexecution.py index f09f9b2248..20d545b250 100644 --- a/tests/foreman/cli/test_remoteexecution.py +++ b/tests/foreman/cli/test_remoteexecution.py @@ -345,7 +345,7 @@ def test_positive_run_job_effective_user( 'organization-id': module_org.id, } ) - if not rex_contenthost.os_version.major == 7 and is_open('SAT-30898'): + if rex_contenthost.os_version.major != 7 and is_open('SAT-30898'): assert 'Permission denied' in out @pytest.mark.tier3