Verified Commit 06710cd0 authored by Pierre-Louis Bonicoli's avatar Pierre-Louis Bonicoli 🏗
Browse files

Tox: add k8s environment

parent 580919af
......@@ -165,3 +165,29 @@ burp_clients:
options:
compression: 'gzip0'
```
# Functional tests
The tests require `tox` and either Docker or Kubernetes.
## Docker
The following command allows to run the tests using Docker:
tox -e py38-ansible29-molecule-docker
## Kubernetes
### Requirements
`jmespath` and `openshift` Python packages are required on Ansible controller.
### Execution
With Kubernetes, the following command allows to run the tests:
tox -e py38-ansible29-molecule-k8s
The following command can be used in order to specify the path of the `kubeconfig` file:
KUBECONFIG=/path/to/kubeconfig.yaml TOX_TESTENV_PASSENV=KUBECONFIG tox -e py38-ansible29-molecule-k8s
......@@ -17,7 +17,7 @@ practices.
.. code-block:: bash
$ pip install -r molecule/requirements.txt
$ pip install molecule[docker] -r molecule/requirements.txt
Usage
=====
......
molecule[docker]
testinfra
yamllint
ansible-lint
......
[tox]
minversion = 3.9.0
envlist =
py38-ansible29-molecule
py38-ansible29-molecule-{docker,k8s}
skipdist = True
skip_missing_interpreters = True
......@@ -16,7 +16,11 @@ setenv =
deps =
https://github.com/pyca/pynacl/archive/b17f41b94f23faae96f939cd226f1487399a440b.zip ; platform_machine=="aarch64"
ansible29: ansible>=2.9,<2.10
docker: molecule[docker]
k8s: molecule
k8s: jmespath
k8s: openshift
-rmolecule/requirements.txt
commands =
molecule matrix test
molecule --base-config molecule/base.yml matrix test
......@@ -4,7 +4,7 @@
parent: tox-pods # from gitlab.com/pilou-/zuul-project-config
timeout: 3600 # seconds
vars:
tox_envlist: py38-ansible29-molecule
tox_envlist: py38-ansible29-molecule-k8s
tox_install_siblings: false
nodeset:
nodes:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment