Skip to content

Latest commit

 

History

History
55 lines (37 loc) · 1.08 KB

testing.md

File metadata and controls

55 lines (37 loc) · 1.08 KB

Testing

We use molecule with docker test our collection, those tests are automatically executed on the sr.ht CI. You can view the configuration under the .build directory.

Dependencies

If you want to use Molecule, you should install those dependencies:

  • Ansible
  • Molecule
  • Docker driver for molecule

You can install them by running those commands :

pip install ansible
pip install molecule
pip install 'molecule-driver'

Running the tests locally

You can also run those tests locally with molecule:

$ molecule test

You can also run those test and keep the container up after executing the tests, for that you should add the flag --destroy to never.

Or run (almost) each steps by hand:

  • Create the container

    $ molecule create
  • Apply converge playbook (Basically install Dolibarr dependencies and Dolibarr itself) :

    $ molecule converge -s install
  • Then get a shell within the created container :

    molecule login -s install
  • And finally debug :-)