generated from the-liberated-edge/wikijs
Automate the execution of all molecule scenarios
This commit is contained in:
parent
7d6f05e201
commit
2daf133a80
20
README.md
20
README.md
@ -217,22 +217,12 @@ Navigate to the root folder of the local copy of this git repository.
|
|||||||
cd test_linux_containers
|
cd test_linux_containers
|
||||||
```
|
```
|
||||||
|
|
||||||
Install locally a snapshot version of `theliberatededge.test_linux_containers`
|
Run the following task to execute all of the Ansible Molecule test scenarios
|
||||||
that will be used as the foundation for automated testing.
|
in the project.
|
||||||
|
|
||||||
```
|
```
|
||||||
LC_ALL=C.UTF-8 ansible-galaxy install -r requirements-test.yml --force
|
LTE_CONTAINER_ROOT_PWD=<password> task test-all
|
||||||
```
|
```
|
||||||
|
|
||||||
Execute all existing Ansible Molecule scenarios.
|
`LTE_CONTAINER_ROOT_PWD` is an environment variable denoting the password
|
||||||
|
of the `root` user in the testing container.
|
||||||
```
|
|
||||||
cd extensions
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
LC_ALL=C.UTF-8 \
|
|
||||||
LTE_CONTAINER_NAME=<container name> \
|
|
||||||
LTE_CONTAINER_ROOT_PWD=<password> \
|
|
||||||
molecule test --all
|
|
||||||
```
|
|
||||||
|
|||||||
15
Taskfile.yml
15
Taskfile.yml
@ -13,3 +13,18 @@ tasks:
|
|||||||
lint-ansible:
|
lint-ansible:
|
||||||
deps: [lint-yml]
|
deps: [lint-yml]
|
||||||
cmds: [LC_ALL=C.UTF-8 ansible-lint .]
|
cmds: [LC_ALL=C.UTF-8 ansible-lint .]
|
||||||
|
init-tests:
|
||||||
|
cmds:
|
||||||
|
- LC_ALL=C.UTF-8 ansible-galaxy install -r requirements-test.yml --force
|
||||||
|
test-all:
|
||||||
|
deps: [init-tests]
|
||||||
|
dir: extensions
|
||||||
|
cmds:
|
||||||
|
- |
|
||||||
|
LC_ALL=C.UTF-8 \
|
||||||
|
LTE_CONTAINER_NAME={{ .LTE_CONTAINER_NAME }} \
|
||||||
|
LTE_CONTAINER_ROOT_PWD={{ .LTE_CONTAINER_ROOT_PWD }} \
|
||||||
|
molecule test --all
|
||||||
|
vars:
|
||||||
|
LTE_CONTAINER_NAME:
|
||||||
|
sh: cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 8 | head -n 1
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user