Browse Source

Use local CA in dev env

pull/617/head
4 years ago
parent
commit
eb7488333c
  1. 2
      sh/tests/Dockerfile
  2. 6
      sh/tests/solutions/myfamily.sh
  3. 6
      sh/tests/solutions/who-are-you.sh

2
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"]

6
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

6
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'

Loading…
Cancel
Save