diff --git a/robottelo/hosts.py b/robottelo/hosts.py index b51eecc15b4..e98f398cc59 100644 --- a/robottelo/hosts.py +++ b/robottelo/hosts.py @@ -1611,7 +1611,8 @@ def install(self, installer_obj=None, cmd_args=None, cmd_kwargs=None): """General purpose installer""" if not installer_obj: command_opts = {'scenario': self.__class__.__name__.lower()} - command_opts.update(cmd_kwargs) + if cmd_kwargs: + command_opts.update(cmd_kwargs) installer_obj = InstallerCommand(*cmd_args, **command_opts) return self.execute(installer_obj.get_command(), timeout=0) @@ -1710,22 +1711,6 @@ def set_rex_script_mode_provider(self, mode='ssh'): if result.status != 0: raise SatelliteHostError(f'Failed to enable pull provider: {result.stdout}') - def run_installer_arg(self, *args, timeout='20m'): - """Run an installer argument on capsule""" - installer_args = list(args) - installer_command = InstallerCommand( - installer_args=installer_args, - ) - result = self.execute( - installer_command.get_command(), - timeout=timeout, - ) - if result.status != 0: - raise SatelliteHostError( - f'Failed to execute with arguments: {installer_args} and,' - f' the stderr is {result.stderr}' - ) - def set_mqtt_resend_interval(self, value): """Set the time interval in seconds at which the notification should be re-sent to the mqtt host until the job is picked up or cancelled""" diff --git a/tests/foreman/api/test_capsule.py b/tests/foreman/api/test_capsule.py index 86aaa089922..48dd6d4b75b 100644 --- a/tests/foreman/api/test_capsule.py +++ b/tests/foreman/api/test_capsule.py @@ -46,7 +46,7 @@ def test_positive_update_capsule(request, pytestconfig, target_sat, module_capsu # refresh features features = capsule.refresh() - module_capsule_configured.run_installer_arg('enable-foreman-proxy-plugin-openscap') + module_capsule_configured.install(cmd_args=['enable-foreman-proxy-plugin-openscap']) features_new = capsule.refresh() assert len(features_new["features"]) == len(features["features"]) + 1 assert 'Openscap' in [feature["name"] for feature in features_new["features"]]