From 8a61f243c2692f1716cf5bab5dbb0f35501e7212 Mon Sep 17 00:00:00 2001 From: vijay sawant Date: Wed, 31 Jan 2024 18:31:31 +0530 Subject: [PATCH] small fix related to repo sync bulk canceled scenario (#13951) (cherry picked from commit 2c726d838557dc18e3dd4b4c58100f37c70917b6) --- tests/foreman/api/test_repository.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/foreman/api/test_repository.py b/tests/foreman/api/test_repository.py index 764e14bbfd7..903c8ab3c4a 100644 --- a/tests/foreman/api/test_repository.py +++ b/tests/foreman/api/test_repository.py @@ -1442,7 +1442,7 @@ def test_positive_bulk_cancel_sync(self, target_sat, module_entitlement_manifest time.sleep(30) target_sat.api.ForemanTask().bulk_cancel(data={"task_ids": sync_ids[5:]}) for sync_id in sync_ids: - sync_result = target_sat.api.ForemanTask(id=sync_id).poll(canceled=True) + sync_result = target_sat.api.ForemanTask(id=sync_id).poll(must_succeed=False) assert ( 'Task canceled' in sync_result['humanized']['errors'] or 'No content added' in sync_result['humanized']['output'] @@ -1703,7 +1703,7 @@ def test_positive_cancel_docker_repo_sync(self, repo, target_sat): # Need to wait for sync to actually start up time.sleep(2) target_sat.api.ForemanTask().bulk_cancel(data={"task_ids": [sync_task['id']]}) - sync_task = target_sat.api.ForemanTask(id=sync_task['id']).poll(canceled=True) + sync_task = target_sat.api.ForemanTask(id=sync_task['id']).poll(must_succeed=False) assert 'Task canceled' in sync_task['humanized']['errors'] assert 'No content added' in sync_task['humanized']['output']