`testinfra <https://testinfra.readthedocs.io/>`__ tests verify the setup,
and end-to-end tests that check the webservice availability.
Testinfra tests
===============
Testinfra tests are split into two groups, lets call them *blackbox* and
*clearbox* tests. The blackbox tests run on your provisioning machine and test
the Stackspin cluster from the outside. For example, the certificate check will check
if the Stackspin returns valid certificates for the provided services.
The clearbox tests run on the Stackspin host and check i.e. if docker is installed
in the right version etc. Our testinfra tests are a combination of blackbox and
clearbox tests.
If you have installed the Stackspin python requirements inside a :ref:`virtual environment <installation/install_cli:Create a python virtual environment (Optional)>`
then you need to activate it before testing:
.. code:: console
$ . env/bin/activate
Then enter the *test* directory in the Git repository
**on your provisioning machine**.
.. code:: console
$ cd test
To run the test against your cluster, first export the *CLUSTER_DIR*
environment variable with the location of your cluster config directory
(replace *stackspin.example.org* with your cluster name):
Then export the *KUBECONFIG* variable that lets ``kubectl`` talk to your cluster.
Thirdly, export a variable that contains the password for the Prometheus HTTP endpoint.