Skip to content

Commit

Permalink
Quick fix- CI failure- for number of found CV publish tasks (Satellit…
Browse files Browse the repository at this point in the history
…eQE#14890)

CI fix for CV publish tasks
  • Loading branch information
damoore044 authored Apr 30, 2024
1 parent de93ea2 commit 15101cf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/foreman/api/test_contentview.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,7 @@ def test_negative_publish_during_repo_sync(self, content_view, module_target_sat
2. HTTP exception raised, assert publish task failed for expected reason,
repo sync task_id found in humanized error, content-view versions unchanged.
"""
org = content_view.organization.read()
# add repository to content-view
content_view.repository = [self.yum_repo]
content_view.update(['repository'])
Expand All @@ -565,15 +566,14 @@ def test_negative_publish_during_repo_sync(self, content_view, module_target_sat
with pytest.raises(HTTPError) as InternalServerError:
content_view.publish()
assert str(content_view.id) in str(InternalServerError)

# search for failed publish task
task_action = 'Actions::Katello::ContentView::Publish'
task_action = f"Publish content view '{content_view.name}', organization '{org.name}'"
task_search = module_target_sat.api.ForemanTask().search(
query={'search': f'{task_action} and started_at >= "{timestamp}"'}
)
assert len(task_search) == 1
assert len(task_search) > 0
task_id = task_search[0].id
# task failed for expected reason
# publish task failed for expected reason
task = module_target_sat.api.ForemanTask(id=task_id).poll(must_succeed=False)
assert task['result'] == 'error'
assert len(task['humanized']['errors']) == 1
Expand Down

0 comments on commit 15101cf

Please sign in to comment.