Skip to content
This repository has been archived by the owner on May 24, 2023. It is now read-only.

Commit

Permalink
Update instructions for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
flokoe committed Aug 10, 2020
1 parent 1afc8fd commit 56ea8c4
Showing 1 changed file with 22 additions and 21 deletions.
43 changes: 22 additions & 21 deletions TESTING.md
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.

0 comments on commit 56ea8c4

Please sign in to comment.