This repository has been archived by the owner on May 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
22 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,36 @@ | ||
# TESTING | ||
This role includes everything necessary to be tested with [Molecule](https://molecule.readthedocs.io/en/latest/). The | ||
[installation documentation](https://molecule.readthedocs.io/en/latest/installation.html) provides | ||
a great walk-through to get started. | ||
|
||
## Running tests | ||
Run all tests (all scenarios on all platforms): | ||
This role includes everything necessary to be tested with [Molecule](https://molecule.readthedocs.io/en/latest/). | ||
|
||
``` shell | ||
molecule test --all | ||
``` | ||
To install all required dependencies in a local development environment you can execute the following: | ||
|
||
Run specific scenario (scenario `default` is used by default) | ||
```bash | ||
# If not existent | ||
python3 -m venv env | ||
|
||
``` shell | ||
molecule test -s default | ||
source env/bin/activate | ||
|
||
pip3 install --upgrade -r requirements.txt | ||
``` | ||
|
||
Don't destroy container after running the tests: | ||
## Running tests | ||
|
||
``` shell | ||
molecule test --destroy never | ||
To run the default scenario just execute | ||
|
||
```bash | ||
molecule test | ||
``` | ||
|
||
Run only linter | ||
To execute the role and preserve the containers use | ||
|
||
``` shell | ||
molecule lint | ||
```bash | ||
molecule converge | ||
``` | ||
|
||
Run only syntax checks | ||
After that you can manually execute all tests with | ||
|
||
```bash | ||
molecule verify | ||
``` | ||
|
||
``` shell | ||
molecule syntax | ||
``` | ||
For more details on how to use molecule please refer to the documentation. |