From 0e1e4890e2a6496510a444a707f13dccfe6449b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hellebrandt?= Date: Wed, 14 Feb 2024 13:04:24 +0100 Subject: [PATCH] setup_org_for_a_rh_repo fix (#13970) * setup_org_for_a_rh_repo fix * Use helper --- robottelo/host_helpers/cli_factory.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/robottelo/host_helpers/cli_factory.py b/robottelo/host_helpers/cli_factory.py index 5e47b021c8e..6debf436c11 100644 --- a/robottelo/host_helpers/cli_factory.py +++ b/robottelo/host_helpers/cli_factory.py @@ -729,13 +729,7 @@ def _setup_org_for_a_rh_repo(self, options=None): # If manifest does not exist, clone and upload it if len(self._satellite.cli.Subscription.exists({'organization-id': org_id})) == 0: with clone() as manifest: - self._satellite.put(manifest.path, manifest.name) - try: - self._satellite.cli.Subscription.upload( - {'file': manifest.name, 'organization-id': org_id} - ) - except CLIReturnCodeError as err: - raise CLIFactoryError(f'Failed to upload manifest\n{err.msg}') from err + self._satellite.upload_manifest(org_id, manifest.content) # Enable repo from Repository Set try: self._satellite.cli.RepositorySet.enable(