Skip to content

Commit

Permalink
small fix related to repo sync bulk canceled scenario (#13951)
Browse files Browse the repository at this point in the history
(cherry picked from commit 2c726d8)
  • Loading branch information
vijaysawant authored and web-flow committed Jan 31, 2024
1 parent 4075522 commit 8a61f24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/foreman/api/test_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down Expand Up @@ -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']

Expand Down

0 comments on commit 8a61f24

Please sign in to comment.