From c0ef7bdcc3e252e7b1cddfc21fdb2cf231c6746e Mon Sep 17 00:00:00 2001
From: Maarten de Waard <maarten@greenhost.nl>
Date: Thu, 3 Oct 2019 09:47:44 +0200
Subject: [PATCH] edit test/README.md

---
 test/README.md | 41 ++++++++++++++++++++++++++++++-----------
 1 file changed, 30 insertions(+), 11 deletions(-)

diff --git a/test/README.md b/test/README.md
index 7b4c0d2f6..68dff43a8 100644
--- a/test/README.md
+++ b/test/README.md
@@ -1,11 +1,17 @@
-# 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
-- 
GitLab