The script runs various DNF commands and checks the exit codes and also checks if the module name and stream appears in particular lists.
The script should be run under root privileges or with
sudo because DNF needs it to successfully operate.
There are several options that can be used to control the functionality:
-m, --module defines the name of the module for which the actions will be done.
-s, --stream defines the stream that will be used to work with.
-u, --upgrade defines the newer stream to be used for some of the functionality, for example switching streams.
-a, --action is a comma-separated list of actions that will be tested with the module.
-w, --whitelist accepts a text file with whitelisted modules (one module on a line) that can be used not to report modules without default streams and profiles set, if that is what the author of the module wanted. Otherwise, you would have a lot of false positives.
The script will, when running, print out useful information about single tests and when it finishes, it will print out the overall results of the actions to the console. So, it will be easy to see in the OpenQA video, for example, how the test went and debugging will be easier.
The script exits with exit code 0 when all tests pass. If some of the tests will not, the script exits with exit code 1. The script will not stop until all scheduled tests will have run, no matter if they pass or not.
list returns the module's streams and profiles that exist in the system
enable tests if a module:stream can be enabled
disable tests if a module:stream can be disabled
install tests if a module:stream can be installed
remove tests if a module:stream can be removed
reset tests if a module:stream can be reset
checkdefaults tests if a module has default stream and profile set
testyaml tests if system modules have corresponding yaml files in fedora-module-defaults repository.
switch tests if a module:stream can be switched to a different stream. Note: Since direct stream switching is not supported any more, this action uses a combination of other pre-defined actions to achieve the switch. It can be replaced by using the install, remove, reset actions for the old stream and then install for the new stream.
Note: If you test more functions at once, always reset the module:stream after you have removed it.