Changeset - 893d2f1e7ddd
[Not reviewed]
0 1 0
Branko Majic (branko) - 12 days ago 2024-09-07 15:17:29
branko@majic.rs
MAR-218: Update instructions for running the tests.
1 file changed with 9 insertions and 3 deletions:
0 comments (0 inline, 0 general)
docs/development.rst
Show inline comments
 
@@ -31,13 +31,13 @@ performing the following steps:
 
     libffi-dev libssl-dev
 

	
 
2. In order to be able to run role tests, it is necessary to install `VirtualBox
 
   <https://www.virtualbox.org/>`_ and `Vagrant <https://www.vagrantup.com/>`_,
 
   using instructions outlined on their respective websites. It is recommended
 
   to use latest versions available. At time of this writing the role tests have
 
   been successfully run on *VirtualBox 5.2.12* and *Vagrant 2.0.4*.
 
   been successfully run on *VirtualBox 7.0.20* and *Vagrant 2.3.7*.
 

	
 
3. In order to allow static IPv6 addresses to be allocated to virtual
 
   machines during testing, it is necessary to explicitly white-list
 
   the range used by the tests. Once the configuration file has been
 
   created, however, even the VirtualBox default allowed IPv4 subnet
 
   needs to be in the configuration explicitly as well.
 
@@ -110,13 +110,13 @@ When writing new and updating existing tasks, keep the following in mind:
 
  form with ``param=value``.
 
- When specifying ``command`` or ``shell`` tasks, in case a ``creates``
 
  parameter or such need to be used, specify them as part of task's ``args``
 
  parameter. E.g.::
 

	
 
    - name: Run command
 
      command: mycommand
 
      ansible.builtin.command: mycommand
 
      args:
 
        creates: "/etc/mycommand"
 

	
 
- When sepcifying tasks, keep the following ordering between different task
 
  parameters:
 

	
 
@@ -157,13 +157,19 @@ In order to run tests for a specific role, perform the following steps:
 
     workon majic-ansible-roles
 

	
 
2. Change directory::
 

	
 
     cd roles/ROLENAME/
 

	
 
3. Run the default test scenario (this will normally test against
 
3. Run the linters::
 

	
 
     flake8 .
 
     yamllint .
 
     ansible-lint .
 

	
 
4. Run the default test scenario (this will normally test against
 
   multiple Debian versions if supported)::
 

	
 
     molecule test
 

	
 

	
 
Running role tests via shell script
0 comments (0 inline, 0 general)