From Fedora Project Wiki

(Created page with "{{QA/Test_Case |description= This test is a follow-up for the QA:Tescase_Modularity_module_defaults test case and tests that all system modules have their default definiti...")
 
(Create the new test case for modularity.)
Line 1: Line 1:
{{QA/Test_Case
{{QA/Test_Case
|description= This test is a follow-up for the [[QA:Tescase_Modularity_module_defaults]] test case and tests that all system modules have their default definition yaml files in the '''fedora-module-defaults''' repository at Pagure.   
|description= This test is a follow-up for the [[QA:Testcase_Modularity_module_defaults]] test case and tests that all system modules have their default definition yaml files in the '''fedora-module-defaults''' repository at Pagure.   
|setup=  
|setup=  
# Make sure you have a clean installation of Fedora (all flavors are possible).  
# Make sure you have a clean installation of Fedora (all flavors are possible).  
# Log onto the system as a ''superuser'' or a user with ''sudo'' rights.  
# Log onto the system as a ''superuser'' or a user with ''sudo'' rights.  
# Run a terminal application, such as '''gnome-terminal''', or switch to a virtual console ('''Ctrl-Alt-F3'''). The following test is based on the  '''DNF''' package manager.
# Run a terminal application, such as '''gnome-terminal''', or switch to a virtual console ('''Ctrl-Alt-F3'''). The following test is based on the  '''DNF''' package manager.
# Clone the definition yaml files, using `git clone https://pagure.io/releng/fedora-module-defaults` onto your system.
'''Note:''' For the time's being, users can work with modules using '''dnf'''. In the future, other package managers will be able to deal with it. Until then, do not attempt to test this approach using tools other than '''dnf'''.
'''Note:''' For the time's being, users can work with modules using '''dnf'''. In the future, other package managers will be able to deal with it. Until then, do not attempt to test this approach using tools other than '''dnf'''.


|actions=
|actions=
<ol>
<ol>
  <li>List available modules: <br/>
  <li>List a module: <br/>
       Execute <code> dnf module list</code>. </li>
       Execute <code> dnf module list <module></code>. </li>
  <li>Check for module streams. The stream column of a listed module '''must not''' be empty, i.e. there must be at least one stream for each listed module available. The module does not need to have a default stream, marked `[d]`, as default streams are not required. However, it can have one.<br/>
  <li>Read the information on streams and profiles.<br/>
  <li>Check for profiles. The profile column of a listed module '''must not''' be empty, i.e. there must be at least one profile available for every stream. There might be more profiles available.<br/>
  <li>Check if the a corresponding yaml file is present in the `fedora-module-defaults` directory that you have cloned before. </li>
<li>Check for defaults profiles. For every module stream, there '''must be one''', and '''only one''', default profile, marked `[d]`, set. <br/>
  <li>Check that the yaml file is correctly formed (see below).</li>
  <li>For every examined module, check the detailed info, too.<br/>
  <li>Check that the settings given by the yaml file correspond with the system settings.</li>
    Execute the <code>dnf module list <module></code> and see if the information corresponds with the previous information.</li>
  <li>Check that the module can be installed using the following command: <br/>
      Execute <code>dnf module install <module>:<stream></code>, but do not explicitly provide any profile.</li>
<li>Check that the module has been successfully installed.<br/>
    Execute <code>dnf module list --installed</code>.</li>
</ol>
</ol>


|results=
|results=
# The listed module provides at least one stream.
# All system modules '''must have their yaml files''' in the above mentioned directory.
# The listed module provide at least one profile for each stream.
# The yaml file contains a `document` section where the value is `modulemd-defaults`.
# For each module stream, at least one profile is marked as '''default'''.
# The yaml file contains a `version` section and the value is `1`.
# The detailed information corresponds with the information in the overview.
# The yaml file contains a `data` section, where the defaults are defined.
# The module's stream can be installed without explicitly providing the profile.
# If the module has a default stream defined, then the `data` section contains a `stream` section and the value matches the default stream reported by the installed system. If default stream is not defined, there '''must be no''' `stream` section in the file.
# The module is installed with the selected stream and its default profile.
# The `data` section contains the `profiles` section, where streams and their default profiles are given. For example, `4.5 [server]` means that the module has a stream called `4.5` and that stream has a default profile called `server`. The yaml file definition '''must''' correspond with the situation reported by `dnf module list <module>` on the installed system.  


 
'''Notes''':
'''Notes''':
* If you find any discrepancies between the module defaults definitions and the real situation on the installed system, or if the yaml definition does not exist at all, please report a bug against this particular module [https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora%20Modules in Fedora Modules].
* Currently (August 2019), some modules do not have (default) profiles set, because their creators decided that they are not meant to be installed, they only provide dependencies. However, the good practice is that such modules do have a default profile, too. In this case, the default profile should be empty, i.e. not provide any packages to install and therefore the installation part of this test case will not succeed. If not sure, check with the module's creator. 
* If the above described operations do not succeed and the reported error seems to be a modular problem, i.e. a missing profile or stream, broken dependencies, and similar, then please report a bug against this particular module [https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora%20Modules in Fedora Modules].
* If the problem seems to be DNF related, the file a bug against DNF.
}}
}}

Revision as of 11:54, 2 August 2019

Description

This test is a follow-up for the QA:Testcase_Modularity_module_defaults test case and tests that all system modules have their default definition yaml files in the fedora-module-defaults repository at Pagure.

Setup

  1. Make sure you have a clean installation of Fedora (all flavors are possible).
  2. Log onto the system as a superuser or a user with sudo rights.
  3. Run a terminal application, such as gnome-terminal, or switch to a virtual console (Ctrl-Alt-F3). The following test is based on the DNF package manager.
  4. Clone the definition yaml files, using git clone https://pagure.io/releng/fedora-module-defaults onto your system.

Note: For the time's being, users can work with modules using dnf. In the future, other package managers will be able to deal with it. Until then, do not attempt to test this approach using tools other than dnf.

How to test

  1. List a module:
    Execute dnf module list <module>.
  2. Read the information on streams and profiles.
  3. Check if the a corresponding yaml file is present in the fedora-module-defaults directory that you have cloned before.
  4. Check that the yaml file is correctly formed (see below).
  5. Check that the settings given by the yaml file correspond with the system settings.

Expected Results

  1. All system modules must have their yaml files in the above mentioned directory.
  2. The yaml file contains a document section where the value is modulemd-defaults.
  3. The yaml file contains a version section and the value is 1.
  4. The yaml file contains a data section, where the defaults are defined.
  5. If the module has a default stream defined, then the data section contains a stream section and the value matches the default stream reported by the installed system. If default stream is not defined, there must be no stream section in the file.
  6. The data section contains the profiles section, where streams and their default profiles are given. For example, 4.5 [server] means that the module has a stream called 4.5 and that stream has a default profile called server. The yaml file definition must correspond with the situation reported by dnf module list <module> on the installed system.

Notes:

  • If you find any discrepancies between the module defaults definitions and the real situation on the installed system, or if the yaml definition does not exist at all, please report a bug against this particular module in Fedora Modules.