Skip to content

Commit

Permalink
Add testing notes for proxy-test
Browse files Browse the repository at this point in the history
  • Loading branch information
devonh committed May 17, 2024
1 parent c59189f commit 4d01b12
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,26 @@ unit tests and lints in a local development environment:
- `tox -e check_types` to check types with MyPy.
- `tox` **to do all of the above.**

### Testing proxy support

To test whether proxy support is working or not, a docker compose file has been
provided to make things easier.

For GCM Pushkin proxy testing follow these steps:
- create a firebase project & service account
- download the service account file from firebase & save to `./scripts-dev/proxy-test/service_account.json`
- configure the PROJECT_ID in `./scripts-dev/proxy-test/sygnal.yaml`
- cd to `./scripts-dev/proxy-test/`
- run `docker compose up`
- in another terminal, run `docker exec -it sygnal bash`
- run `apt update && apt install curl -y`
- run `chmod +x curl.sh`
- run `./curl.sh`
- you can tell if the proxy is **NOT** working by inspecting the sygnal logs & seeing something along the lines of "Network is unreachable" or DNS resolution/proxy errors
- you cal tell if the proxy is working by inspecting the sygnal logs & seeing the following error from firebase '"code": 400, "message": "The registration token is not a valid FCM registration token"'
- this is due to the `pushkey` being set to PUSHKEY_HERE in `notification.json`
- if you want to fully test an actual notification, you will have to update this value in `./scripts-dev/proxy-test/notification.json` before calling `docker compose up`

## Updating your pull request

If you decide to make changes to your pull request - perhaps to address issues
Expand Down

0 comments on commit 4d01b12

Please sign in to comment.