use assert_script_run when possible
ClosedPublic

Authored by adamwill on Jan 9 2016, 12:58 AM.

Details

Summary

D637 / ec6b3ff4 switched from using needle matches to using
validate_script_output when we want to run a console command
and check the result. validate_script_output is kinda over-
powered when all you want to do is check the command succeeded
(returned 0), though. testapi provides assert_script_run for
doing exactly that - it runs a script and fails if the script
fails (returns anything but 0). This gives us cleaner code and
is slightly more robust; validate_script_output uses the mini
web server on the worker, which I've occasionally seen crap
out, so it seems good to avoid using it when possible. assert_
script_run doesn't need it.

Test Plan

Check all (affected) tests still work properly.

Diff Detail

Repository
rOPENQATESTS os-autoinst-distri-fedora
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
adamwill retitled this revision from to use assert_script_run when possible.Jan 9 2016, 12:58 AM
adamwill updated this object.
adamwill edited the test plan for this revision. (Show Details)
adamwill added reviewers: jskladan, garretraziel.
jskladan accepted this revision.Jan 12 2016, 10:03 AM
This revision is now accepted and ready to land.Jan 12 2016, 10:03 AM
garretraziel accepted this revision.Jan 12 2016, 11:24 AM

I run whole testsuite and it works OK.

This revision was automatically updated to reflect the committed changes.