diff --git a/sh/tests/Dockerfile b/sh/tests/Dockerfile index 63f5fd32..dfbc03ec 100644 --- a/sh/tests/Dockerfile +++ b/sh/tests/Dockerfile @@ -2,5 +2,7 @@ FROM debian:stable-slim RUN apt-get update RUN apt-get -y install jq curl git +COPY --from=mkcert-ca . /usr/local/share/ca-certificates +RUN update-ca-certificates COPY . /app ENTRYPOINT ["/bin/bash", "/app/entrypoint.sh"] diff --git a/sh/tests/solutions/myfamily.sh b/sh/tests/solutions/myfamily.sh index c2ed75ff..a1549631 100755 --- a/sh/tests/solutions/myfamily.sh +++ b/sh/tests/solutions/myfamily.sh @@ -5,9 +5,5 @@ set -euo pipefail IFS=' ' -f="" -# --insecure flag to make it work with dev environment (self-signed certificate) -test "$DOMAIN" = "localhost" && f="--insecure" - -curl $f --compressed --silent --show-error --max-time 10 https://$DOMAIN/assets/superhero/all.json | +curl --compressed --silent --show-error --max-time 10 https://$DOMAIN/assets/superhero/all.json | jq ".[] | select(.id == $HERO_ID)" | grep relatives | cut -d'"' -f4 diff --git a/sh/tests/solutions/who-are-you.sh b/sh/tests/solutions/who-are-you.sh index 27681479..6eb82adf 100755 --- a/sh/tests/solutions/who-are-you.sh +++ b/sh/tests/solutions/who-are-you.sh @@ -5,9 +5,5 @@ set -euo pipefail IFS=' ' -f="" -# --insecure flag to make it work with dev environment (self-signed certificate) -test "$DOMAIN" = "localhost" && f="--insecure" - -curl $f --compressed --silent --show-error --max-time 10 https://$DOMAIN/assets/superhero/all.json | +curl --compressed --silent --show-error --max-time 10 "https://$DOMAIN/assets/superhero/all.json" | jq '.[] | select(.id == 70) | .name'