Skip to content

Commit

Permalink
Remove this commit before merge
Browse files Browse the repository at this point in the history
  • Loading branch information
jameerpathan111 committed May 30, 2024
1 parent 5078ca7 commit b8f04d0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
3 changes: 2 additions & 1 deletion robottelo/utils/issue_handlers/jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def add_comment_on_jira(
return None
data = try_from_cache(issue_id)
if data["status"] in settings.jira.issue_status:
logger.debug(f"Adding a new comment on {issue_id} Jira issue.")
logger.debug(f"Adding a new comment:\n {comment} \n on {issue_id} Jira issue.")
response = requests.post(
f"{settings.jira.url}/rest/api/latest/issue/{issue_id}/comment",
json={
Expand All @@ -313,6 +313,7 @@ def add_comment_on_jira(
},
headers={"Authorization": f"Bearer {settings.jira.api_key}"},
)
logger.debug(f"Jira response:\n {response.json()}")
response.raise_for_status()
return response.json()
logger.warning(
Expand Down
33 changes: 18 additions & 15 deletions tests/foreman/api/test_ping.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,27 @@

@pytest.mark.e2e
@pytest.mark.build_sanity
def test_positive_ping(target_sat):
def test_positive_ping():
"""Check if all services are running
:id: b8ecc7ba-8007-4067-bf99-21a82c833de7
:expectedresults: Overall and individual services status should be 'ok'.
:Verifies: SAT-24796, SAT-25230
"""
assert True


@pytest.mark.e2e
@pytest.mark.build_sanity
def test_positive_random_test():
"""Check if all services are running
:id: b8ecc7ba-8007-4067-bf99-21a82c833de9
:expectedresults: Overall and individual services status should be 'ok'.
:Verifies: SAT-24796, SAT-25230
"""
response = target_sat.api.Ping().search_json()
assert response['status'] == 'ok' # overall status

# Check that all services are OK. ['services'] is in this format:
#
# {'services': {
# 'candlepin': {'duration_ms': '40', 'status': 'ok'},
# 'candlepin_auth': {'duration_ms': '41', 'status': 'ok'},
# …
# }, 'status': 'ok'}
services = response['services']
assert all(
[service['status'] == 'ok' for service in services.values()]
), 'Not all services seem to be up and running!'
pytest.fail("negative test")

0 comments on commit b8f04d0

Please sign in to comment.