-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CC Automation] Test for Scheduled insights sync job #16913
base: master
Are you sure you want to change the base?
[CC Automation] Test for Scheduled insights sync job #16913
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me, thanks for the test case
module_target_sat, | ||
): | ||
"""Verify that triggering the InsightsScheduledSync job in Satellite succeeds with no errors | ||
:id: 59f66062-2865-4cca-82bb-8d0501fd40f1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ColeHiggins2 add a blank line here so that the sphinx is satisfied, you can check it locally using make test-docstrings
:id: 59f66062-2865-4cca-82bb-8d0501fd40f1 | |
:id: 59f66062-2865-4cca-82bb-8d0501fd40f1 |
Otherwise seems good to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left one comment regarding docstring formating, otherwise looks good.
And also can we run some PRT on this please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proposed a small change for better readability. Also please kick on the PRT so we know how it works in CI.
task_output = module_target_sat.api.ForemanTask().search( | ||
query={'search': f'id = {inventory_sync["task"]["id"]}'} | ||
) | ||
assert task_output[0].output['host_statuses']['sync'] == 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ColeHiggins2 Could we define/name some constant for this so we know what it means?
Maybe in robottelo/constants/__init__.py
something like
INSIGHT_SYNC_STATUS = Box(OK = 2, FAIL = 3, UNKNOWN = 42)
and use it globally? (I've seen it at more places already)
assert task_output[0].output['host_statuses']['sync'] == INSIGHT_SYNC_STATUS.OK
I think @toledo would know the valid statuses, he could help here.
(I used Box
coz I like .
syntax, but could be dict
or anything.)
No description provided.