diff options
| author | Jeroen Wijenbergh <jeroenwijenbergh@protonmail.com> | 2022-04-25 16:43:36 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-04-25 16:43:36 +0200 |
| commit | d566499c3c6bcb8945bc9f0253508cc273582880 (patch) | |
| tree | 66b4ab4a95591c646a24281e9fd7074e5339625f /docs/src/gettingstarted/testing.md | |
| parent | a20beedd3b35b974d7bce325cc3f1959489e7443 (diff) | |
Docs: Update with more sections
Diffstat (limited to 'docs/src/gettingstarted/testing.md')
| -rw-r--r-- | docs/src/gettingstarted/testing.md | 40 |
1 files changed, 40 insertions, 0 deletions
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. |
