Merge ci: smoke test dell'immagine senza falsi errori di pipe (#123)
This commit was merged in pull request #123.
This commit is contained in:
commit
fa9304834a
1 file changed
+6
-2
@@ -152,8 +152,12 @@ jobs:
|
|||||||
curl -fsS --max-time 5 "http://$NAME-app:8080/health"
|
curl -fsS --max-time 5 "http://$NAME-app:8080/health"
|
||||||
echo
|
echo
|
||||||
test "$(curl -s -o /dev/null -w '%{http_code}' --max-time 5 "http://$NAME-app:8080/")" = "302"
|
test "$(curl -s -o /dev/null -w '%{http_code}' --max-time 5 "http://$NAME-app:8080/")" = "302"
|
||||||
curl -fsS --max-time 5 "http://$NAME-app:8080/login" | grep -q "Accedi"
|
# Read the whole response first: grep -q closes the pipe at the first match, and with pipefail the
|
||||||
curl -fsS -D - -o /dev/null --max-time 5 "http://$NAME-app:8080/login" | grep -qi "content-security-policy"
|
# write error of curl (exit 23) would fail the step depending on timing.
|
||||||
|
login="$(curl -fsS --max-time 5 "http://$NAME-app:8080/login")"
|
||||||
|
grep -q "Accedi" <<<"$login"
|
||||||
|
headers="$(curl -fsS -D - -o /dev/null --max-time 5 "http://$NAME-app:8080/login")"
|
||||||
|
grep -qi "content-security-policy" <<<"$headers"
|
||||||
test "$(docker exec "$NAME-app" sh -c 'stat -c %u:%g /proc/1')" = "99:100"
|
test "$(docker exec "$NAME-app" sh -c 'stat -c %u:%g /proc/1')" = "99:100"
|
||||||
test "$(docker exec "$NAME-app" stat -c %u:%g /data)" = "99:100"
|
test "$(docker exec "$NAME-app" stat -c %u:%g /data)" = "99:100"
|
||||||
docker exec "$NAME-app" pg_dump --version
|
docker exec "$NAME-app" pg_dump --version
|
||||||
|
|||||||
Reference in new issue
Block a user