Skip to content

Commit

Permalink
fix: e2e test case
Browse files Browse the repository at this point in the history
  • Loading branch information
guqing committed Nov 27, 2023
1 parent be0536c commit f5c76ff
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions e2e/testsuite.yaml
Expand Up @@ -3,7 +3,7 @@ api: |
{{default "http://halo:8090" (env "SERVER")}}/apis
param:
postName: "{{randAlpha 6}}"
userName: "{{randAlpha 6}}"
userName: "{{.param.userName}}"
notificationName: "{{randAlpha 6}}"
auth: "Basic YWRtaW46MTIzNDU2"
items:
Expand Down Expand Up @@ -96,7 +96,7 @@ items:
body: |
{
"spec": {
"recipient": "{{.param.userName}}",
"recipient": "admin",
"reason": "fake-reason",
"title": "test 评论了你的页面《关于我》",
"rawContent": "Fake raw content",
Expand All @@ -114,10 +114,21 @@ items:
Authorization: "{{.param.auth}}"
expect:
statusCode: 201
- name: getNotificationByName
request:
api: /notification.halo.run/v1alpha1/notifications/{{.param.notificationName}}
method: GET
header:
Authorization: "{{.param.auth}}"
expect:
statusCode: 200
verify:
- data.spec.reason == "fake-reason"
- data.spec.title == "test 评论了你的页面《关于我》"
- name: deleteUserNotification
request:
api: |
/api.notification.halo.run/userspaces/{{.param.userName}}/v1alpha1/notifications/{{.param.notificationName}}
/api.notification.halo.run/v1alpha1/userspaces/admin/notifications/{{.param.notificationName}}
method: DELETE
header:
Authorization: "{{.param.auth}}"

0 comments on commit f5c76ff

Please sign in to comment.