From 31f5dd5fe165215283c64799ce0a7fd61f543667 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=81=A3?= <⁣> Date: Sun, 17 May 2020 11:28:22 +0200 Subject: [PATCH] Update exercise test --- sh/tests/solutions/who-are-you.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sh/tests/solutions/who-are-you.sh b/sh/tests/solutions/who-are-you.sh index c6fba6f54..27681479b 100755 --- a/sh/tests/solutions/who-are-you.sh +++ b/sh/tests/solutions/who-are-you.sh @@ -5,6 +5,9 @@ set -euo pipefail IFS=' ' -r=$(curl --compressed -sSm10 https://01.alem.school/assets/superhero/all.json) +f="" +# --insecure flag to make it work with dev environment (self-signed certificate) +test "$DOMAIN" = "localhost" && f="--insecure" -echo "$r" | jq '.[] | select(.id == 70) | .name' +curl $f --compressed --silent --show-error --max-time 10 https://$DOMAIN/assets/superhero/all.json | + jq '.[] | select(.id == 70) | .name'