| 1 | # Signalgrid Integration Tests |
| 2 | |
| 3 | This directory contains integration tests for the Signalgrid push notification service in Shoutrrr. |
| 4 | The tests mock HTTP requests to the Signalgrid Push API and do not make outbound network calls. |
| 5 | |
| 6 | ## Test Coverage |
| 7 | |
| 8 | ### Configuration |
| 9 | |
| 10 | - URL parsing for `signalgrid://CLIENT_KEY@CHANNEL` |
| 11 | - Mixed-case client key and channel token preservation |
| 12 | - Query parameters (`title`, `type`, `critical`) |
| 13 | - Rejection of missing client key or channel |
| 14 | |
| 15 | ### Message Sending |
| 16 | |
| 17 | - Basic message sending |
| 18 | - Title via URL query parameter |
| 19 | - Title via params map |
| 20 | - Type and critical flags |
| 21 | - Omission of empty title and false critical |
| 22 | - Empty message handling |
| 23 | |
| 24 | ### Error Handling |
| 25 | |
| 26 | - HTTP error responses (400, 401, 403, 404, 500) |
| 27 | - Network errors |
| 28 | |
| 29 | ### API Compliance |
| 30 | |
| 31 | - Endpoint `https://api.signalgrid.co/v1/push` |
| 32 | - POST method |
| 33 | - `application/x-www-form-urlencoded` content type |
| 34 | - Form fields `client_key`, `channel`, `body`, `title`, `type`, `critical` |
| 35 | - User-Agent `shoutrrr/<version>` |
| 36 | |
| 37 | ## Running the Tests |
| 38 | |
| 39 | ```bash |
| 40 | go test ./testing/integration/signalgrid/ -v |
| 41 | ``` |