From Fedora Project Wiki

(Add module removal (without package checking))
(Rewrite module installation test)
Line 1: Line 1:
 
{{QA/Test_Case
 
{{QA/Test_Case
|description= Install, remove and udpate modules in Fedora Server
+
|description=This test case proves that a module can be installed on the system.
|setup=  
+
|setup=To test this feature:
# To start and learn how to list modules, follow the instructions in this test case [https://fedoraproject.org/wiki/QA:Testcase_Modularity_module_list]
+
# Install a '''clean''' Fedora 30 or newer.
 +
|actions=
 +
# Open a terminal session, either use '''gnome-terminal''' or a virtual console.
 +
# List available modules using <code>dnf module list</code> and choose one of them to do the next step. Find out if the module has a '''default stream''' and a '''default profile''' set. Based on this, follow one of the scenarios. When you attempt to install a module without  a default stream or profile, omitting to specify the stream or profile in the installation command will only result in enabling that module. Pay attention to this and always use the appropriate command.
 +
# Install a module with default stream and profile:
 +
## Install the module using <code>dnf module install <module></code>.
 +
# Install a module without a default stream, or choose a non-default stream:
 +
## Install the module using <code>dnf module install <module>:<stream></code>.
 +
# Install a module without a default profile, or choose a non-default profile:
 +
## Install the module using <code>dnf module install <module>:<stream>/<profile></code>.
 +
# List the enabled modules <code>dnf module list --enabled</code>.
 +
# List the installed modules <code>dnf module list --installed</code>.
 +
# Check that packages were really installed <code>rpm -qa <module></code>.
 +
# If the installed module was an application or a service, try to run it.
 +
|results=
 +
The following requirements must be met:
 +
# All installation commands must run without errors.
 +
# All installation commands must result in packages installed on the system.
 +
# The installed module must be listed in both '''--enabled''' and '''--installed''' lists.
 +
# <code>rpm -qa <module> </code> must return the installed package with the same version as declared by the module.
 +
# If the module was an application or a service, it should attempt to start.
 +
# Using <code>dnf module install <module>:<stream></code> should be enough to install every module.
  
|actions=
+
'''Note:''' All modules should have a '''default profile''' and  they should be able to install using <code>dnf module install <module>:<stream></code>. If a module does not have a default profile set, report a bug for it.  
=== Installing Modules===
+
|optional=
To install a module, use the following commands:
 
* <code>dnf install module</code> to install the defaul stream and profile of the module.
 
* <code>dnf module install module:stream</code> to install a module with a particular stream.
 
Check, that the module is correctly installed, appears in the list of installed modules and shows the correct stream.
 
 
 
=== Removing Modules===
 
Note, that to successfully perform this operation, the module must not be disabled! To remove a module, use the following commands:
 
* <code>dnf module remove module:stream</code> to remove a module in a particular stream.
 
Check, that the module is does not appear in the list of installed modules. It can, however, still appear in the list of enabled modules until it has been disabled.
 
 
 
|results=
 
All above commands execute without errors.
 
# When you install the module (:stream), the module must install and must appear on the list of both enabled and installed modules. It cannot appear on the list of disabled modules.
 
# When you remove the module (:stream), the module must disappear from the list of installed modules.
 
  
|optional= Try various modules and streams/profiles.
 
 
}}
 
}}

Revision as of 13:53, 8 March 2019

Description

This test case proves that a module can be installed on the system.

Setup

To test this feature:

  1. Install a clean Fedora 30 or newer.

How to test

  1. Open a terminal session, either use gnome-terminal or a virtual console.
  2. List available modules using dnf module list and choose one of them to do the next step. Find out if the module has a default stream and a default profile set. Based on this, follow one of the scenarios. When you attempt to install a module without a default stream or profile, omitting to specify the stream or profile in the installation command will only result in enabling that module. Pay attention to this and always use the appropriate command.
  3. Install a module with default stream and profile:
    1. Install the module using dnf module install <module>.
  4. Install a module without a default stream, or choose a non-default stream:
    1. Install the module using dnf module install <module>:<stream>.
  5. Install a module without a default profile, or choose a non-default profile:
    1. Install the module using dnf module install <module>:<stream>/<profile>.
  6. List the enabled modules dnf module list --enabled.
  7. List the installed modules dnf module list --installed.
  8. Check that packages were really installed rpm -qa <module>.
  9. If the installed module was an application or a service, try to run it.

Expected Results

The following requirements must be met:

  1. All installation commands must run without errors.
  2. All installation commands must result in packages installed on the system.
  3. The installed module must be listed in both --enabled and --installed lists.
  4. rpm -qa <module> must return the installed package with the same version as declared by the module.
  5. If the module was an application or a service, it should attempt to start.
  6. Using dnf module install <module>:<stream> should be enough to install every module.

Note: All modules should have a default profile and they should be able to install using dnf module install <module>:<stream>. If a module does not have a default profile set, report a bug for it.