Skip to content
Snippets Groups Projects
Verified Commit c0ef7bdc authored by Maarten de Waard's avatar Maarten de Waard :angel:
Browse files

edit test/README.md

parent 2c51cfd3
No related branches found
No related tags found
No related merge requests found
# Run testinfra tests
# Tests
Test host configured in `../clusters/CLUSTERNAME/inventory.yml`
There are two types of tests: "testinfra" tests, and "behave" tests. "Testinfra"
tests run on the OAS machine and test if the infrastructure of the machine is
setup correctly. They also test the validity of TLS certificates. The
"behave" tests run in a browser and test if all the interfaces are still up and
running.
export inventory=../clusters/CLUSTERNAME/inventory.yml
## Run *testinfra* tests
Test host configured in `../clusters/CLUSTERNAME/inventory.yml`
py.test -v --ansible-inventory=${inventory} --hosts='ansible://*'
export INVENTORY=../clusters/CLUSTERNAME/inventory.yml
py.test -v --ansible-inventory=${INVENTORY} --hosts='ansible://*'
Specify host manually:
......@@ -13,15 +19,15 @@ Specify host manually:
Run only tests tagged with `prometheus`:
py.test -v --ansible-inventory=${inventory} --hosts='ansible://*' -m prometheus
py.test -v --ansible-inventory=${INVENTORY} --hosts='ansible://*' -m prometheus
## Cert tests
### Cert tests
Run cert test manually using the ansible inventory file:
ADDRESS='example.openappstack.net' py.test -v -m 'certs' \
--connection=ansible \
--ansible-inventory=${inventory} \
--ansible-inventory=${INVENTORY} \
--hosts='ansible://*'
Run cert test manually against a different cluster, not configured in any
......@@ -33,11 +39,24 @@ or directly (allows better debugging since pytest won't eat stdout):
ADDRESS='example.openappstack.net' pytest/test_certs.py
## Issues
- Default ssh backend is `paramiko`, which doesn't work oout of the
box. It fails to connect to the host because the `ed25519` hostkey
was not verified. Therefore we need to force plain ssh:// with either
## Run *behave* tests
The behave tests are controlled by the `openappstack` CLI command suite. To run
the behave tests, run the following command in this repository:
python -m openappstack CLUSTERNAME test
In the future, this command will run all tests, but now only *behave* is
implemented. To learn more about the `test` subcommand, run:
python -m openappstack CLUSTERNAME test --help
## Known Issues
- Default ssh backend for testinfra tests is `paramiko`, which doesn't work oout
of the box. It fails to connect to the host because the `ed25519` hostkey was
not verified. Therefore we need to force plain ssh:// with either
`connection=ssh` or `--hosts=ssh://…`
# Running bootstrap CI with local gitlab-runner docker executor
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment