From c32a1512f2d373592a16f5d2b30a21dcdbc8f21a Mon Sep 17 00:00:00 2001 From: Werner Beroux Date: Wed, 29 Jul 2020 20:37:52 +0200 Subject: [PATCH] Adds Autotest. --- Dockerfile | 4 +++- Dockerfile.armhf | 3 +++ docker-compose.test.yml | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 docker-compose.test.yml diff --git a/Dockerfile b/Dockerfile index 75fe949..481c4d2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,6 @@ RUN set -x \ && rm -f /ngrok.zip \ # Create non-root user. && adduser -h /home/ngrok -D -u 6737 ngrok -RUN ngrok --version # Add config script. COPY --chown=ngrok ngrok.yml /home/ngrok/.ngrok2/ @@ -31,6 +30,9 @@ COPY entrypoint.sh / USER ngrok ENV USER=ngrok +# Basic sanity check. +RUN ngrok --version + EXPOSE 4040 CMD ["/entrypoint.sh"] diff --git a/Dockerfile.armhf b/Dockerfile.armhf index dd5a7e7..7d905c8 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -15,6 +15,9 @@ RUN set -x \ COPY --chown=ngrok ngrok.yml /home/ngrok/.ngrok2/ COPY entrypoint.sh / +# Basic sanity check. +RUN su ngrok -c 'ngrok --version' + RUN [ "cross-build-end" ] USER ngrok diff --git a/docker-compose.test.yml b/docker-compose.test.yml new file mode 100644 index 0000000..f010965 --- /dev/null +++ b/docker-compose.test.yml @@ -0,0 +1,3 @@ +sut: + build: . + command: sh -c '(ngrok http 8080 &) && sleep 5 && curl --connect-timeout 5 --silent --show-error --fail http://localhost:4040'