make cleanup happen even if workflow fails
All checks were successful
test-backend / test-x86_64 (push) Successful in 29s

This commit is contained in:
2025-05-25 21:23:29 +03:00
parent 79ef0a093c
commit 655eb1e0f2
2 changed files with 13 additions and 6 deletions

View File

@@ -13,17 +13,18 @@ assert_bad_status () {
}
HOST=127.0.0.1
ARGS="--fail-with-body"
curl -f http://$HOST/movies
curl $ARGS http://$HOST/movies
assert_good_status
curl -f http://$HOST/passes
curl $ARGS http://$HOST/passes
assert_good_status
curl -X POST -f http://$HOST/apply_for_pass
curl -X POST $ARGS http://$HOST/apply_for_pass
assert_bad_status
curl -X POST -f http://$HOST/apply_for_pass \
curl -X POST $ARGS http://$HOST/apply_for_pass \
-H "Content-Type: application/json" \
--data '{"first": "Hannah",
"last": "Dirt",
@@ -33,5 +34,7 @@ curl -X POST -f http://$HOST/apply_for_pass \
"movie_uuid": "742a2542-2b50-11f0-ae4c-f7bedd5fcc88"}'
assert_good_status
curl -f http://$HOST/passes | jq '.result.[0]'
sleep 5
curl $ARGS http://$HOST/passes | jq '.result.[0]'
assert_good_status