Add broadcast notifications test data

This commit is contained in:
Daniel 2022-06-23 16:30:55 +02:00
parent 959bb012b8
commit 92cc733aca
2 changed files with 31 additions and 0 deletions

9
broadcasts/testdata/README.md vendored Normal file
View file

@ -0,0 +1,9 @@
# Testing Broadcast Notifications
```
# Reset state
curl -X POST http://127.0.0.1:817/api/v1/broadcasts/reset-state
# Simulate notifications
curl --upload-file notifications.yaml http://127.0.0.1:817/api/v1/broadcasts/simulate
```

22
broadcasts/testdata/notifications.yaml vendored Normal file
View file

@ -0,0 +1,22 @@
notifications:
test1:
title: "[TEST] Normal Broadcast"
message: "This is a normal broadcast without matching. (#1)"
test2:
title: "[TEST] Permanent Broadcast"
message: "This is a permanent broadcast without matching. (#2)"
type: 1 # Warning
permanent: true
test3:
title: "[TEST] Repeating Broadcast"
message: "This is a repeating broadcast without matching. (#3)"
repeat: "1m"
test4:
title: "[TEST] Matching Broadcast: PM version"
message: "This is a normal broadcast that matches the PM version. (#4)"
match: "NumericVersion > 8000"
test5:
title: "[TEST] Important Update"
message: "A criticial update has been released, please update immediately. (#5)"
type: 3 # Error
attachToModule: true