README.md

Testing DNF operations on modular content (Fedora 29)

The script runs various DNF commands and checks the exit codes and also checks if the module name and stream appears in particular lists.

Usage:

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.

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.

Actions:

  • list checks if the module:stream exists 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
  • switch tests if a module:stream can be switched to a different stream

Note: If you test more functions at once, always disable the module:stream after you have removed it.