Skip to content

Commit

Permalink
Split tests into separate files
Browse files Browse the repository at this point in the history
  • Loading branch information
Fishbowler committed Oct 17, 2024
1 parent 5c6031e commit aefc460
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

- name: Test the plugin
run: |
hurl --test --variables-file test/test.env test/restAPI.hurl
hurl --test --variables-file test/test.env --jobs 1 test/*.hurl
- name: Expose Openfire logs
uses: actions/upload-artifact@v4
Expand Down
14 changes: 14 additions & 0 deletions test/chatrooms.hurl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
GET http://localhost:9090/plugins/restapi/v1/chatrooms
Authorization: {{authkey}}
HTTP 200

GET http://localhost:9090/plugins/restapi/v1/sessions
Authorization: {{authkey}}
HTTP 200
[Asserts]
xpath "/sessions[not(child::node())]" count == 1 # sessions at the root, with no child nodes


GET http://localhost:9090/plugins/restapi/v1/system/readiness/server
Authorization: {{authkey}}
HTTP 200
11 changes: 11 additions & 0 deletions test/clustering.hurl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
GET {{host}}/plugins/restapi/v1/clustering/status
Authorization: {{authkey}}
HTTP 200
[Asserts]
xpath "string(/clustering/status)" == "Disabled"

GET {{host}}/plugins/restapi/v1/clustering/nodes
Authorization: {{authkey}}
HTTP 200
[Asserts]
xpath "/clusterNodes[not(child::node())]" exists
32 changes: 0 additions & 32 deletions test/restAPI.hurl → test/groups.hurl
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
### CLUSTERING ###

GET {{host}}/plugins/restapi/v1/clustering/status
Authorization: {{authkey}}
HTTP 200
[Asserts]
xpath "string(/clustering/status)" == "Disabled"

GET {{host}}/plugins/restapi/v1/clustering/nodes
Authorization: {{authkey}}
HTTP 200
[Asserts]
xpath "/clusterNodes[not(child::node())]" exists


### USER GROUPS ###

GET http://localhost:9090/plugins/restapi/v1/groups
Authorization: {{authkey}}
Expand Down Expand Up @@ -83,19 +67,3 @@ DELETE http://localhost:9090/plugins/restapi/v1/groups/group1
Authorization: {{authkey}}
HTTP 200


### CHAT ROOMS ###
GET http://localhost:9090/plugins/restapi/v1/chatrooms
Authorization: {{authkey}}
HTTP 200

GET http://localhost:9090/plugins/restapi/v1/sessions
Authorization: {{authkey}}
HTTP 200
[Asserts]
xpath "/sessions[not(child::node())]" count == 1 # sessions at the root, with no child nodes


GET http://localhost:9090/plugins/restapi/v1/system/readiness/server
Authorization: {{authkey}}
HTTP 200

0 comments on commit aefc460

Please sign in to comment.