mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Fix tests
This commit is contained in:
parent
6d8697cd9d
commit
d88160218b
@ -49,7 +49,7 @@ jobs:
|
||||
run: |
|
||||
./keibi > logs &
|
||||
wget --retry-connrefused --retry-on-http-error=502 http://localhost:4568/health
|
||||
hurl --variable host=http://localhost:4568 tests/*
|
||||
hurl --error-format long --variable host=http://localhost:4568 tests/*
|
||||
env:
|
||||
POSTGRES_SERVER: localhost
|
||||
|
@ -6,13 +6,13 @@ POST {{host}}/sessions
|
||||
}
|
||||
HTTP 404
|
||||
|
||||
# Invalid password
|
||||
# Invalid username
|
||||
POST {{host}}/sessions
|
||||
{
|
||||
"login": "invalid-password-user",
|
||||
"login": "invalid-username-user",
|
||||
"password": "pass"
|
||||
}
|
||||
HTTP 403
|
||||
HTTP 404
|
||||
|
||||
# Me cant be accessed without an account
|
||||
GET {{host}}/users/me
|
||||
|
@ -27,14 +27,15 @@ DELETE {{host}}/sessions/current
|
||||
Authorization: Bearer {{jwt}}
|
||||
HTTP 200
|
||||
|
||||
POST {{hosts}}/sessions
|
||||
# Ensure we can login again & /users/me is the same
|
||||
POST {{host}}/sessions
|
||||
{
|
||||
"login": "login-user",
|
||||
"password": "password-login-user"
|
||||
}
|
||||
HTTP 201
|
||||
[Captures]
|
||||
jwt: jsonpath "$.token"
|
||||
token: jsonpath "$.token"
|
||||
|
||||
GET {{host}}/jwt
|
||||
Authorization: Bearer {{token}}
|
||||
@ -49,6 +50,15 @@ HTTP 200
|
||||
jsonpath "$.username" == "login-user"
|
||||
body == {{register_info}}
|
||||
|
||||
|
||||
# Invalid password login
|
||||
POST {{host}}/sessions
|
||||
{
|
||||
"login": "login-user",
|
||||
"password": "pass-invalid"
|
||||
}
|
||||
HTTP 403
|
||||
|
||||
DELETE {{host}}/users/me
|
||||
Authorization: Bearer {{jwt}}
|
||||
HTTP 200
|
||||
|
Loading…
x
Reference in New Issue
Block a user