From d566499c3c6bcb8945bc9f0253508cc273582880 Mon Sep 17 00:00:00 2001 From: Jeroen Wijenbergh Date: Mon, 25 Apr 2022 16:43:36 +0200 Subject: Docs: Update with more sections --- docs/src/gettingstarted/testing.md | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 docs/src/gettingstarted/testing.md (limited to 'docs/src/gettingstarted/testing.md') diff --git a/docs/src/gettingstarted/testing.md b/docs/src/gettingstarted/testing.md new file mode 100644 index 0000000..f89757e --- /dev/null +++ b/docs/src/gettingstarted/testing.md @@ -0,0 +1,40 @@ +# Testing +To test the Go code, issue the following command in a shell + +## Testing the Go code +```bash +make test-go +``` + +Note that this runs the tests without any server interaction. To run the tests with an eduVPN server you need to specify environment variables: + +```bash +SERVER_URI="eduvpn.example.com" PORTAL_USER="example" PORTAL_PASS="example" make test-go +``` + +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 eduvpnserver for testing +- A Go container that builds and runs the test-suite + +```bash +PORTAL_USER="example" PORTAL_PASS="example" ./ci/startcompose.sh +``` + +This script is also used in the continuous integration, so we recommend to run this before you submit any changes. +## 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): + +```bash +make test-wrappers +``` + +Specify `-j` to execute tests in parallel. You can specify specific wrappers to test by appending +e.g. `WRAPPERS="csharp php"`. + +## Test everything +To test all the code at once, issue the following command: +```bash +make test +``` + +This accepts the same environment variables as we have explained before. -- cgit v1.2.3