os-autoinst-distri-opensuse
os-autoinst-distri-opensuse copied to clipboard
Fix usage of validate_script_output
I was just pointed to this code by @vtrubovics, and that it does not work as expected.
This should do what was oriinally intended.
Maybe someone familiar with this test can do a verification run?
http://open.qa/api/testapi/#_validate_script_output
validate_script_output can take a callback subroutine, where you can write your own code to match the output stored in $_
. Alternatively it takes a regex object, which you can create with qr//
.
If you use
$something = 'm/regex/';
then the variable will just contain an ordinary string starting with the characters 'm' and a forward slash.
- Verification run: tbd
Great PR! Please pay attention to the following items before merging:
Files matching lib/**.pm
:
- [ ] Consider adding or extending unit tests in t/
This is an automatically generated QA checklist based on modified files.
I actually had to fix more usages of openscaptest::_validate_result
. Will run another test
https://openqa.suse.de/tests/10701002 looks good so far except https://openqa.suse.de/tests/10701002#step/oscap_generating_report/10
But that is because the regex doesn't match, specifically the contains 2 rules
because there is only test with contains 1...
.
I'm not the one who can fix that I think.
The last test is still ongoing, not sure why it takes so long.
Is anyone else taking this? Like I said this is a draft because I cannot fix the issue which was uncovered by this.
I will fix it later.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If it's still needed, you can add labels WIP
or notready
to it
This is still an issue. Currently the test will hide failures.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If it's still needed, you can add labels WIP
or notready
to it