From Fedora Project Wiki


This test case verifies that dnf can install a package with various options.


Install a minimal version of Fedora on a test system.

How to test

  • Update the dnf package manager by running dnf upgrade -y.
  • Install the nginx package with the nodocs option using dnf install -y --nodocs nginx.
  • Disable the epel repository and install the git package using dnf install -y --disablerepo=epel git.
  • Enable the epel repository and install the latest version of the nginx package using dnf install -y --enablerepo=epel --best nginx.
  • Override the $releasever value and install the python3 package using dnf install -y --releasever=33 python3.
  • Install the vim package with the setopt option using dnf install -y --setopt=keepcache=1 vim.

Expected Results

The following must be true to consider this a successful test run:

  • All dnf commands complete without error.
  • The nginx, git, python3, and vim packages are installed successfully.
  • The nodocs option is enabled for the nginx installation.
  • The epel repository is disabled during the git installation and enabled during the nginx installation.
  • The latest version of nginx is installed during the nginx installation.
  • The $releasever value is overridden during the python3 installation.
  • The keepcache option is set to 1 during the vim installation.


You can explore additional options for dnf command and verify their behavior in the test case. For example, you can try the --disableplugin and --enableplugin options to disable and enable plugins by name.