From 9c9e6ba264681d1f567c6e92f4f5d9ba81e37bb0 Mon Sep 17 00:00:00 2001 From: Peter Ondrejka Date: Wed, 17 Apr 2024 12:41:47 +0200 Subject: [PATCH] sca for api e2e --- tests/foreman/endtoend/test_api_endtoend.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/tests/foreman/endtoend/test_api_endtoend.py b/tests/foreman/endtoend/test_api_endtoend.py index e8bf062659c..cede80dfecb 100644 --- a/tests/foreman/endtoend/test_api_endtoend.py +++ b/tests/foreman/endtoend/test_api_endtoend.py @@ -1050,7 +1050,7 @@ def test_positive_find_admin_user(self): @pytest.mark.skipif( (not settings.robottelo.REPOS_HOSTING_URL), reason='Missing repos_hosting_url' ) - def test_positive_end_to_end(self, function_entitlement_manifest, target_sat, rhel_contenthost): + def test_positive_end_to_end(self, function_sca_manifest, target_sat, rhel_contenthost): """Perform end to end smoke tests using RH and custom repos. 1. Create a new user with admin permissions @@ -1091,10 +1091,9 @@ def test_positive_end_to_end(self, function_entitlement_manifest, target_sat, rh # step 2.1: Create a new organization user_cfg = user_nailgun_config(login, password) org = target_sat.api.Organization(server_config=user_cfg).create() - org.sca_disable() # step 2.2: Upload manifest - target_sat.upload_manifest(org.id, function_entitlement_manifest.content) + target_sat.upload_manifest(org.id, function_sca_manifest.content) # step 2.3: Create a new lifecycle environment le1 = target_sat.api.LifecycleEnvironment(server_config=user_cfg, organization=org).create() @@ -1152,12 +1151,7 @@ def test_positive_end_to_end(self, function_entitlement_manifest, target_sat, rh name=activation_key_name, environment=le1, organization=org, content_view=content_view ).create() - # step 2.13: Add the products to the activation key - for sub in target_sat.api.Subscription(organization=org).search(): - if sub.name == constants.DEFAULT_SUBSCRIPTION_NAME: - activation_key.add_subscriptions(data={'quantity': 1, 'subscription_id': sub.id}) - break - # step 2.13.1: Enable product content + # step 2.13: Enable product content activation_key.content_override( data={ 'content_overrides': [