mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-04-05 17:51:25 -07:00
test fix, social post delay to 60 min
Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
4
.github/workflows/social_post_on_release.yml
vendored
4
.github/workflows/social_post_on_release.yml
vendored
@@ -7,8 +7,8 @@ jobs:
|
|||||||
post-discord:
|
post-discord:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Wait for 15 minutes
|
- name: Wait for 60 minutes
|
||||||
run: sleep 900 # 15 minutes delay
|
run: sleep 3600 # 60 minutes delay
|
||||||
|
|
||||||
- name: Post to Discord
|
- name: Post to Discord
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -39,10 +39,10 @@ def test_graphql_debug_get(client):
|
|||||||
|
|
||||||
|
|
||||||
def test_graphql_post_unauthorized(client):
|
def test_graphql_post_unauthorized(client):
|
||||||
"""POST /graphql without token should return 401"""
|
"""POST /graphql without token should return 403"""
|
||||||
query = {"query": "{ devices { devName devMac } }"}
|
query = {"query": "{ devices { devName devMac } }"}
|
||||||
resp = client.post("/graphql", json=query)
|
resp = client.post("/graphql", json=query)
|
||||||
assert resp.status_code == 401
|
assert resp.status_code == 403
|
||||||
# Check either error field or message field for the unauthorized text
|
# Check either error field or message field for the unauthorized text
|
||||||
error_text = resp.json.get("error", "") or resp.json.get("message", "")
|
error_text = resp.json.get("error", "") or resp.json.get("message", "")
|
||||||
assert "Unauthorized" in error_text or "Forbidden" in error_text
|
assert "Unauthorized" in error_text or "Forbidden" in error_text
|
||||||
|
|||||||
Reference in New Issue
Block a user