mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-03-30 23:03:03 -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:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Wait for 15 minutes
|
||||
run: sleep 900 # 15 minutes delay
|
||||
- name: Wait for 60 minutes
|
||||
run: sleep 3600 # 60 minutes delay
|
||||
|
||||
- name: Post to Discord
|
||||
run: |
|
||||
|
||||
@@ -39,10 +39,10 @@ def test_graphql_debug_get(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 } }"}
|
||||
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
|
||||
error_text = resp.json.get("error", "") or resp.json.get("message", "")
|
||||
assert "Unauthorized" in error_text or "Forbidden" in error_text
|
||||
|
||||
Reference in New Issue
Block a user