From d2d1b4796454b38bd57af8187478634d80c51141 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Fri, 6 May 2022 15:40:11 +0200 Subject: Docs: Testing additions --- docs/src/gettingstarted/testing.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/src/gettingstarted/testing.md b/docs/src/gettingstarted/testing.md index 7bf4bf2..9ac222f 100644 --- a/docs/src/gettingstarted/testing.md +++ b/docs/src/gettingstarted/testing.md @@ -11,6 +11,8 @@ Note that this runs the tests without any server interaction. To run the tests w SERVER_URI="eduvpn.example.com" PORTAL_USER="example" PORTAL_PASS="example" make test-go ``` +This needs [python3-selenium](https://selenium-python.readthedocs.io/) and [geckodriver](https://github.com/mozilla/geckodriver/releases) (extract and put in your `$PATH`). + If you have [Docker](https://www.docker.com/get-started/) installed and [Docker-compose](https://docs.docker.com/compose/install/) you can use a convenient helper script which starts up two containers - An EduVPN Server for testing - A Go container that builds and runs the test-suite @@ -18,9 +20,14 @@ If you have [Docker](https://www.docker.com/get-started/) installed and [Docker- ```bash PORTAL_USER="example" PORTAL_PASS="example" ./ci/startcompose.sh ``` -Note that this helper script also assumes you have the `openssl` command line tool installed. This is used to install the self-signed certificates for testing. +Note that this helper script also assumes you have the [openssl](https://www.openssl.org/) command line tool installed. This is used to install the self-signed certificates for testing. This script is also used in the continuous integration, so we recommend to run this before you submit any changes. + +There are other environment variables that can be used: + +- `OAUTH_EXPIRED_TTL`: Use this for a server which has a low OAuth access token expiry time, e.g. 10 seconds. You would then set this variable to `"10"` so that a test is ran which waits for 10 seconds for the OAuth tokens to expire +- `SERVER_IS_LOCAL`: Set this to `"1"` such that the server endpoints are taken from `$SERVER_URI/well-known.php` instead of `SERVER_URI/.well-known/vpn-user-portal`. This is common for local development servers ## Testing the wrappers To test the wrappers, issue the following command in a shell (you will need compilers for all wrappers if you do this): -- cgit v1.2.3