test(integration): reorganize Hurl integration tests

This commit is contained in:
Matthieu Bessat 2025-06-14 15:09:26 +02:00
parent 368ff80ef3
commit 15020e9878
18 changed files with 154 additions and 10 deletions

View file

@ -0,0 +1,10 @@
signing_key = "tmp/secrets/signing.key"
applications = []
roles = []
[instance]
base_uri = "http://localhost:8086"
name = "Example org"
logo_uri = "https://example.org/logo.png"

View file

@ -0,0 +1,9 @@
#!/usr/bin/bash
SQL=$(cat <<EOF
INSERT INTO users
(id, handle, email, roles, status, reset_password_token, created_at)
VALUES
('$(uuid)', 'invited_user', 'invited-user@example.org', '[]', 'Invited', 'Z433-Y001-V987-P500', '2024-11-30T00:00:00Z');
EOF)
echo $SQL | sqlite3 $DB_PATH

View file

@ -0,0 +1,28 @@
GET {{ base_url }}/api
HTTP 200
[Asserts]
jsonpath "$.software" == "Minauthator"
GET {{ base_url }}/invitation
[QueryStringParams]
token: Z433-Y001-V987-P500
HTTP 200
[Asserts]
xpath "string(///h1)" contains "Invitation"
POST {{ base_url }}/reset-password
[FormParams]
token: Z433-Y001-V987-P500
password: newpassword10!
password_confirmation: newpassword10!
HTTP 303
[Asserts]
header "Location" == "/login"
POST {{ base_url }}/login
[FormParams]
login: invited_user
password: newpassword10!
HTTP 303
[Asserts]
cookie "minauthator_jwt" exists