RedHatSatellite/soe-ci

Conditional Test Execution

Closed this issue · 2 comments

As a build engineer, I want to be able to write a test that will only execute if the component that it is testing is deployed to the test machine.

I need to implement for a customer a conditional re-building of test VMs, where I plan to use the comment field of the host as decision criteria, i.e. if the name of a Puppet module or of an RPM is found in the comment field in the form #modulename# or #rpmname#, then the host is rebuilt if the specified module/rpm has been modified.

As far as I can judge right now, the comment field of the host is reachable from a Puppet module so that it could be written somewhere in a file and used by test cases to check if they should run or not.

This can be done in Puppet - see here for example.