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