diff --git a/robottelo/cli/contentview.py b/robottelo/cli/contentview.py index f8a3b3ee59..1a00f8a3ef 100644 --- a/robottelo/cli/contentview.py +++ b/robottelo/cli/contentview.py @@ -134,12 +134,12 @@ def version_info(cls, options, output_format=None): return result @classmethod - def version_incremental_update(cls, options): + def version_incremental_update(cls, options, output_format='csv'): """Performs incremental update of the content-view's version""" cls.command_sub = 'version incremental-update' if options is None: options = {} - return cls.execute(cls._construct_command(options), output_format='csv') + return cls.execute(cls._construct_command(options), output_format=output_format) @classmethod def version_list(cls, options): diff --git a/tests/foreman/longrun/test_inc_updates.py b/tests/foreman/longrun/test_inc_updates.py index b4a0d2cfcc..53bb1b9389 100644 --- a/tests/foreman/longrun/test_inc_updates.py +++ b/tests/foreman/longrun/test_inc_updates.py @@ -286,9 +286,10 @@ def test_positive_incremental_update_time(module_target_sat, module_sca_manifest # expect: incr. "version-1.1" is created update_start_time = datetime.utcnow() result = module_target_sat.cli.ContentView.version_incremental_update( - {'content-view-version-id': cvv['id'], 'errata-ids': REAL_RHEL8_1_ERRATA_ID} + options={'content-view-version-id': cvv['id'], 'errata-ids': REAL_RHEL8_1_ERRATA_ID}, + output_format='base', ) - assert 'version-1.1' in str(result[0].keys()) + assert f'Content View: {cv.name} version 1.1' in result update_duration = (datetime.utcnow() - update_start_time).total_seconds() logger.info( f'Update of incremental version-1.1, for CV id: {content_view["id"]},' @@ -305,7 +306,7 @@ def test_positive_incremental_update_time(module_target_sat, module_sca_manifest if update_duration >= publish_duration: # unexpected: perhaps both tasks were very quick, took a handful of seconds, # assert the difference was not significant (within 20%). - assert (update_duration - publish_duration) / publish_duration <= 0.2, ( + assert (update_duration - publish_duration) / publish_duration <= 0.25, ( f'Incremental update took longer than publish of entire content-view id: {content_view["id"]}:' f' Update took significantly more time, 20% or longer, than publish.' f' update duration: {update_duration} s.\n publish duration: {publish_duration} s.'