Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added missing notifications tests. #710

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions tests/default/notifications/configs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,33 @@ chapters:
config_id: webhook-configuration
response:
status: 200
- synopsis: Create another channel configuration.
path: /_plugins/_notifications/configs
method: POST
request:
payload:
config_id: second-configuration
config:
name: Notifications Channel
description: Second notifications channel.
config_type: webhook
is_enabled: true
webhook:
url: http://webhook:8080/
response:
status: 200
- synopsis: Delete multiple channel configurations.
version: '>= 2.2'
path: /_plugins/_notifications/configs
method: DELETE
parameters:
config_id_list: second-configuration
response:
status: 200
epilogues:
- path: /_plugins/_notifications/configs/webhook-configuration
method: DELETE
status: [200,404]
- path: /_plugins/_notifications/configs/second-configuration
method: DELETE
status: [200,404]
16 changes: 15 additions & 1 deletion tests/plugins/notifications/notifications/feature/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ prologues:
url: http://webhook:8080/
status: [200]
chapters:
- synopsis: Test sending a notification.
- synopsis: Test sending a notification (GET).
path: /_plugins/_notifications/feature/test/{config_id}
method: GET
parameters:
Expand All @@ -31,6 +31,20 @@ chapters:
delivery_status:
status_code: '200'
status_text: '{"ok":"true"}'
- synopsis: Test sending a notification (POST).
path: /_plugins/_notifications/feature/test/{config_id}
method: POST
parameters:
config_id: custom-webhook-configuration
response:
status: 200
payload:
status_list:
- config_id: custom-webhook-configuration
config_type: webhook
delivery_status:
status_code: '200'
status_text: '{"ok":"true"}'
epilogues:
- path: /_plugins/_notifications/configs/custom-webhook-configuration
method: DELETE
Expand Down
Loading