-
Notifications
You must be signed in to change notification settings - Fork 66
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
SCAP report and remediation #1441
Conversation
trigger: test-robottelo |
PRT to check whether limit has caused regression |
trigger: test-robottelo |
PRT Result
|
This test wasn't a good choice, it fails in master on stream as well. I'll pick another one. |
trigger: test-robottelo |
PRT Result
|
Ok, this is a true positive, do not merge and I will look into it |
trigger: test-robottelo |
PRT Result
|
Fixed, pls review |
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.
Need to update doc string. Otherwise looks good.
trigger: test-robottelo |
PRT Result
|
@vijaysawant comments addressed |
And the "remove PRT" failure is not this PR's fault |
view.wait_displayed() | ||
self.browser.plugin.ensure_page_safe() | ||
wait_for(lambda: view.title.is_displayed, timeout=10, delay=1) | ||
view.fill({'select_remediation_method.snippet': 'Ansible'}) |
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.
Ansible
is a default value? you could expect some more options there ?
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.
That's what this function does as per docstring: Remediate the failed rule using automatic remediation through Ansible
.
It surely can be changed to allow for different methods. On one hand, it's not a goal of this function/test to test various methods of remote execution. On the other hand, there is a wizard specifically for remediation that lets you choose so IMO this will be a good addition, later.
clicking on the link in Reported At column of | ||
SCAP Report list | ||
|
||
:param search_string: |
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.
what is this search string ? is this any type of entity?
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.
Unfortunately a link to the correct arf report is in the column Reported At
and you get there by clicking the link saying e.g. 1 day ago
... so search actually searches by a (not visible) id in the link.
You call it like this:
session.oscapreport.remediate(f'id={arf_id}', title)
@@ -1929,11 +1929,56 @@ def has_rows(self): | |||
return False | |||
return True | |||
|
|||
def read(self): | |||
def read_limited(self, limit): |
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.
@lhellebr nice addition!
|
||
:return: A :py:class:`dict` of ``widget_name: widget_read_value`` | ||
where the values are retrieved using the :py:meth:`Widget.read`. | ||
""" | ||
if widget_names is None: | ||
if limit is not None: | ||
raise NotImplementedError("You must specify widgets to be able to specify limit") |
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.
s/widgets/widget_names is that right ?
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.
Well... you specify widgets by their names
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.
ACK, non-blocking comments
trigger: test-robottelo |
PRT Result
|
So... after this hasn't been merged for 2 MONTHS, there is a seemingly unrelated issue that I will have to investigate. Does it ring a bell?
|
trigger: test-robottelo |
PRT Result
|
The failure in test_positive_end_to_end is NOT a regression caused by this PR. The same failure appears in the last 6.16 automation. |
trigger: test-robottelo |
PRT Result
|
I'm gonna self-merge in 48 hours unless someone comments here. |
trigger: test-robottelo |
PRT Result
|
We can't merge due to |
* SCAP report and remediation * Fix missing attribute error when called without limit * Comments addressed
Required by SatelliteQE/robottelo#15491
Also, added limit of rows to read because sometimes you don't need them all and it takes a while to read.