summaryrefslogtreecommitdiff
path: root/docs/src/gettingstarted/testing.md
blob: f89757e44cf5830758e70d5557d39e93a466b5e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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.