Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

[1LP][RFR] - Fix for SCAP testcase #9982

Merged
merged 1 commit into from
Apr 1, 2020
Merged

Conversation

dgaikwad
Copy link
Contributor

@dgaikwad dgaikwad commented Mar 12, 2020

Fixed SCAP testcase

Purpose or Intent

PRT Run

{{pytest: ./cfme/tests/cli/test_appliance_console.py::test_appliance_console_scap ./cfme/tests/cli/test_appliance_update.py::test_update_scap_webui -v}}

@dgaikwad dgaikwad changed the title [WIPTEST] - Fix for SCAP testcase [RFR] - Fix for SCAP testcase Mar 12, 2020
Copy link
Contributor

@valaparthvi valaparthvi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good changes!

@valaparthvi valaparthvi changed the title [RFR] - Fix for SCAP testcase [1LP][RFR] - Fix for SCAP testcase Mar 13, 2020
@dajoRH dajoRH changed the title [1LP][RFR] - Fix for SCAP testcase [1LP][WIP] - Fix for SCAP testcase Mar 13, 2020
@jawatts jawatts self-assigned this Mar 13, 2020
@dajoRH dajoRH added the WIP label Mar 13, 2020
else:
logger.info("{}: rule not found".format(rule))
temp_appliance_preconfig.appliance_console.scap_harden_appliance()
assert not temp_appliance_preconfig.appliance_console.scap_check_rules()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional:

I realize this all is my mistake -- i should have done it before, but could you please make more clear that the scap_check_rules returns some kind of iterable of failures? The best would be to rename the method to something like scap_failures.

Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JaryN the return value of scap_check_rules function itself was an iterable object, so now I done the remaining changes, please review once

@dgaikwad dgaikwad changed the title [1LP][WIP] - Fix for SCAP testcase [1LP][WIPTEST] - Fix for SCAP testcase Mar 18, 2020
@dgaikwad dgaikwad changed the title [1LP][WIPTEST] - Fix for SCAP testcase [1LP][RFR] - Fix for SCAP testcase Mar 18, 2020
@@ -80,7 +80,7 @@ def scap_harden_appliance(self):
}))
interaction.answer('Press any key to continue.', '', timeout=AP_WELCOME_SCREEN_TIMEOUT)

def scap_check_rules(self):
def scap_failures(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The doc block here needs to be updated

@@ -116,14 +116,14 @@ def scap_check_rules(self):
if elements:
result = elements[0].findall('./{http://checklists.nist.gov/xccdf/1.1}result')
if result:
if result[0].text != 'pass':
rules_failures.append(rule)
rules_failures.append(False) if result[0].text != 'pass' else (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the functionality of the method is changing. @JaryN suggested to return a iterable list of failures (which is was doing), this is now just returning true or false. The doc block just needs to be updated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jawatts Updated doc string

@jawatts jawatts changed the title [1LP][RFR] - Fix for SCAP testcase [1LP][WIPTEST] - Fix for SCAP testcase Mar 26, 2020
@dajoRH dajoRH changed the title [1LP][WIPTEST] - Fix for SCAP testcase [1LP][WIP] - Fix for SCAP testcase Mar 26, 2020
@dgaikwad dgaikwad changed the title [1LP][WIP] - Fix for SCAP testcase [1LP][WIPTEST] - Fix for SCAP testcase Mar 30, 2020
@dgaikwad dgaikwad changed the title [1LP][WIPTEST] - Fix for SCAP testcase [1LP][RFR] - Fix for SCAP testcase Mar 30, 2020
@dgaikwad dgaikwad requested a review from jawatts March 30, 2020 08:23
@dajoRH dajoRH changed the title [1LP][RFR] - Fix for SCAP testcase [1LP][WIP] - Fix for SCAP testcase Mar 31, 2020
@dgaikwad dgaikwad changed the title [1LP][WIP] - Fix for SCAP testcase [1LP][WIPTEST] - Fix for SCAP testcase Apr 1, 2020
@dajoRH dajoRH added WIP-testing and removed WIP labels Apr 1, 2020
@dgaikwad dgaikwad changed the title [1LP][WIPTEST] - Fix for SCAP testcase [1LP][RFR] - Fix for SCAP testcase Apr 1, 2020
@dajoRH dajoRH removed the WIP-testing label Apr 1, 2020
@jawatts
Copy link
Contributor

jawatts commented Apr 1, 2020

Thanks for working this @dgaikwad !

@jawatts jawatts merged commit 4e11e5b into ManageIQ:master Apr 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants