| 1 | # Signalgrid End-to-End Tests |
| 2 | |
| 3 | This directory contains end-to-end tests for the Signalgrid push notification service. |
| 4 | The tests send real notifications through the Signalgrid Push API. |
| 5 | |
| 6 | ## Coverage |
| 7 | |
| 8 | - **Basic Test** (`basic_test.go`): Sends a plain notification |
| 9 | - **Title Test** (`title_test.go`): Sends a notification with a `title` query parameter |
| 10 | - **Type and Critical Test** (`type_critical_test.go`): Sends `type=CRIT` and `critical=true` notifications |
| 11 | |
| 12 | ## Setup |
| 13 | |
| 14 | 1. Create a [Signalgrid account](https://web.signalgrid.co/) |
| 15 | 2. Copy your [client key](https://docs.signalgrid.co/get-started/find-client-key/) |
| 16 | 3. Copy a [channel token](https://docs.signalgrid.co/get-started/find-channel-token/) |
| 17 | |
| 18 | ### Environment variable |
| 19 | |
| 20 | Create `testing/e2e/signalgrid/.env`: |
| 21 | |
| 22 | ```bash |
| 23 | SHOUTRRR_SIGNALGRID_URL=signalgrid://CLIENT_KEY@CHANNEL |
| 24 | ``` |
| 25 | |
| 26 | Never commit real credentials. `.env` is gitignored. |
| 27 | |
| 28 | Or set the variable inline: |
| 29 | |
| 30 | ```bash |
| 31 | SHOUTRRR_SIGNALGRID_URL='signalgrid://CLIENT_KEY@CHANNEL' \ |
| 32 | go test ./testing/e2e/signalgrid/ -v |
| 33 | ``` |
| 34 | |
| 35 | Tests skip when `SHOUTRRR_SIGNALGRID_URL` is unset. |