diff --git a/robottelo/hosts.py b/robottelo/hosts.py index a5d5e2319f7..d06eb127547 100644 --- a/robottelo/hosts.py +++ b/robottelo/hosts.py @@ -1597,7 +1597,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) @@ -1696,22 +1697,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..95b4203c4e6 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(['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"]]