diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2024-08-12 13:34:09 +0200 |
|---|---|---|
| committer | Jeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com> | 2024-08-12 14:36:36 +0200 |
| commit | 1cf11a26eaaef7619ce4714f63384157530412dc (patch) | |
| tree | 141f334e3d585803836703c75df6a2f2c9db76b0 /docs/src/gettingstarted/testing.md | |
| parent | 456d2c9ba8b38d9df970f6253079881f837450ac (diff) | |
Doc: Update testing
Diffstat (limited to 'docs/src/gettingstarted/testing.md')
| -rw-r--r-- | docs/src/gettingstarted/testing.md | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/docs/src/gettingstarted/testing.md b/docs/src/gettingstarted/testing.md index 7c26202..b072849 100644 --- a/docs/src/gettingstarted/testing.md +++ b/docs/src/gettingstarted/testing.md @@ -1,16 +1,16 @@ # Testing The Go library right now has various tests defined. E.g. server interaction, oauth, discovery and signature verification tests. -To run the test suite, issue the following command in a shell +To run the Go test suite, issue the following command in a shell ```bash -make test-go +make test ``` Note that this runs the tests without any server interaction (so for now only the signature verification tests). 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 +SERVER_URI="eduvpn.example.com" PORTAL_USER="example" PORTAL_PASS="example" make test ``` This needs [python3-selenium](https://selenium-python.readthedocs.io/) and [geckodriver](https://github.com/mozilla/geckodriver/releases) (extract and put in your `$PATH`). Note that testing with a server assumes it uses a default portal, due to it needing to click on buttons on the web page. You can add your own portal by customizing the [called Selenium script](https://github.com/eduvpn/eduvpn-common/blob/main/selenium_eduvpn.py). @@ -30,22 +30,9 @@ 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 - `EDUVPN_PODCOMP`: Set this to 1 to instruct the `./ci/startcompose.sh` script to use [podman-compose](https://github.com/containers/podman-compose) if you prefer this over using docker-compose. -## Testing the wrappers -To test the wrappers, issue the following command in a shell (you will need dependencies for all wrappers if you do this[^1]): - -```bash -make test-wrappers -``` +## Testing the Python code +To test the Python code, issue the following command in a shell (you will need dependencies for all wrappers if you do this[^1]): -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 +make -C wrappers/python test ``` - -This accepts the same environment variables as we have explained before. - -[^1]: For now, this is only the Python wrapper. |
