gotify
The atago project wrote these specs on its own initiative and runs them in its own CI, to exercise atago against a real program. They are not gotify’s official test suite, and the gotify project is not affiliated with atago.
Summary #
1 suite · 3 scenarios
Contents #
- gotify (self-hosted notification server) — 3 scenarios
gotify (self-hosted notification server) #
Gotify receives notifications and hands them back out. The full path is exercised against a real server on SQLite: an application is provisioned over the REST API, a message is pushed with that application’s token, and it is read back with admin credentials — so the message is proven to have been stored and served, not merely accepted.
The refusal matters as much as the delivery: pushing without valid credentials must fail rather than silently drop the notification.
One scenario goes further than JSON. The application’s icon is uploaded as a genuine multipart form-data request, downloaded back to disk, and verified as a real PNG — the same round trip a browser performs, asserted on the bytes that came back.
Source: test/e2e/thirdparty/gotify/gotify.atago.yaml
Scenario: the server reports health and version #
Given #
- Background service
gotifyis started:gotify. - Fixture file
data/.keepis created.
When #
# HTTP GET /health
# HTTP GET /version
Then #
- after
HTTP GET /health:- HTTP status is
200 - body at
$.healthequalsgreen
- HTTP status is
- after
HTTP GET /version:- HTTP status is
200 - body at
$.versionmatches/^[0-9]+\.[0-9]+\.[0-9]+/
- HTTP status is
Scenario: an application pushes and the admin reads it back #
Given #
- Background service
gotifyis started:gotify. - Fixture file
data/.keepis created.
When #
# HTTP GET /message
# HTTP POST /application
# capture ${app_token} from the response body
# HTTP POST /message
# HTTP GET /message
Then #
- after
HTTP GET /message:- HTTP status is
401
- HTTP status is
- after
HTTP POST /application:- HTTP status is
200 - body at
$.nameequalsatago-pipeline
- HTTP status is
- after
HTTP POST /message:- HTTP status is
200 - body at
$.titleequalsDeploy done
- HTTP status is
- after
HTTP GET /message:- HTTP status is
200 - body at
$.messageshas length 1 - body at
$.messages[0].priorityequals5
- HTTP status is
Scenario: the app icon round-trips through a multipart upload #
Given #
- Background service
gotifyis started:gotify. - Fixture file
data/.keepis created. - Fixture file
icon.pngis created.
When #
# HTTP POST /application
# capture ${app_id} from the response body
# HTTP POST /application/${app_id}/image
# capture ${image_path} from the response body
# HTTP GET /${image_path}
Then #
- after
HTTP POST /application:- HTTP status is
200
- HTTP status is
- after
HTTP POST /application/${app_id}/image:- HTTP status is
200 - body at
$.imagematches/^image//
- HTTP status is
- after
HTTP GET /${image_path}:- HTTP status is
200 - image
fetched-icon.pngispng, width 1, height 1
- HTTP status is
Generated artifacts #
fetched-icon.png