os-autoinst-distri-opensuse icon indicating copy to clipboard operation
os-autoinst-distri-opensuse copied to clipboard

Fix usage of validate_script_output

Open perlpunk opened this issue 1 year ago • 8 comments

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

perlpunk avatar Mar 14 '23 20:03 perlpunk

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.

github-actions[bot] avatar Mar 14 '23 20:03 github-actions[bot]

I actually had to fix more usages of openscaptest::_validate_result. Will run another test

perlpunk avatar Mar 15 '23 11:03 perlpunk

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.

perlpunk avatar Mar 15 '23 12:03 perlpunk

Is anyone else taking this? Like I said this is a draft because I cannot fix the issue which was uncovered by this.

perlpunk avatar Mar 31 '23 12:03 perlpunk

I will fix it later.

vtrubovics avatar Mar 31 '23 13:03 vtrubovics

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

stale[bot] avatar Aug 12 '23 04:08 stale[bot]

This is still an issue. Currently the test will hide failures.

perlpunk avatar Aug 12 '23 11:08 perlpunk

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

stale[bot] avatar Dec 15 '23 07:12 stale[bot]