Run hurl tests via cargo (#12)
This allows us to pull them into the coverage report. Reviewed-on: #12 Co-authored-by: Drew Galbraith <drew@tiramisu.one> Co-committed-by: Drew Galbraith <drew@tiramisu.one>
This commit is contained in:
parent
68dbaa32c9
commit
2880391c8c
6 changed files with 805 additions and 32 deletions
|
|
@ -12,7 +12,7 @@ build-backend:
|
|||
|
||||
[working-directory: 'backend']
|
||||
test-unit-backend:
|
||||
cargo test
|
||||
cargo test -- --skip api
|
||||
|
||||
[working-directory: 'backend']
|
||||
fmt-backend:
|
||||
|
|
@ -46,19 +46,7 @@ migrate-revert:
|
|||
|
||||
[working-directory: 'backend']
|
||||
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
|
||||
cargo test --test api
|
||||
|
||||
[working-directory: 'backend']
|
||||
test-coverage:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue