Allow creating and updating tasks on the backend. (#2)

Create hurl tests along with the necessary api code to resolve them.

Reviewed-on: #2
Co-authored-by: Drew Galbraith <drew@tiramisu.one>
Co-committed-by: Drew Galbraith <drew@tiramisu.one>
This commit is contained in:
Drew 2025-09-20 18:49:11 +00:00 committed by Drew
parent 82d524a62f
commit d32f6be813
10 changed files with 306 additions and 28 deletions

View file

@ -33,3 +33,18 @@ migrate:
migrate-revert:
sqlx migrate revert
test-integration:
#!/usr/bin/env bash
set -e
cargo run &
SERVER_PID=$!
trap 'echo "Stopping server..."; kill -TERM $SERVER_PID 2>/dev/null || true; wait $SERVER_PID 2>/dev/null || true' EXIT
echo "Waiting for server to start..."
printf 'GET http://localhost:3000/health\nHTTP 200' | hurl --retry 30 > /dev/null
echo "Running integration tests..."
hurl --test --error-format long --variable host=http://localhost:3000 tests/api/*.hurl