From 80340031d776b1b45fc0550671403fc6b9cdd89d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Mat=C4=9Bj=C4=8Dek?= Date: Thu, 23 Feb 2023 16:56:12 +0100 Subject: [PATCH] Added simple test for glassfish and updated commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: David Matějček --- library/glassfish | 2 +- test/config.sh | 3 +++ test/tests/glassfish/run.sh | 21 +++++++++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100755 test/tests/glassfish/run.sh diff --git a/library/glassfish b/library/glassfish index e1bd9403ed9543..0b7c50659d5565 100644 --- a/library/glassfish +++ b/library/glassfish @@ -3,7 +3,7 @@ Maintainers: David Matejcek (@dmatej), Ondro Mihalyi (@ondromih) GitRepo: https://github.com/OmniFish-EE/docker-library-glassfish.git GitFetch: refs/heads/main -GitCommit: f7c6e852939b321ca1f9bb2ddeacab4df2ed0bc1 +GitCommit: 12efd43d7633d89cb28edf3a5b0cf3c12ac31c1f Tags: 7.0.0, 7.0.0-jdk17, 7.0.0-jdk17-eclipse-temurin Architectures: amd64 diff --git a/test/config.sh b/test/config.sh index fcdeb8cc7959ef..bf3eb73b4769c0 100644 --- a/test/config.sh +++ b/test/config.sh @@ -76,6 +76,9 @@ imageTests+=( [ghost]=' ghost-basics ' + [glassfish]=' + glassfish + ' [golang]=' golang-hello-world ' diff --git a/test/tests/glassfish/run.sh b/test/tests/glassfish/run.sh new file mode 100755 index 00000000000000..ad6cea9a9f4079 --- /dev/null +++ b/test/tests/glassfish/run.sh @@ -0,0 +1,21 @@ +#!/bin/bash +set -eo pipefail + +serverImage="$1" +containerId="$(docker run -d "$serverImage")" +trap "docker rm -vf $containerId > /dev/null" EXIT + +logLine='^\s+Eclipse GlassFish\s+[\.0-9]+' +timeout=60 + +until docker logs $containerId 2>&1 | grep -q -E "$logLine" +do + if [ $timeout -eq 0 ] + then + exit 100; + fi + sleep 1 + timeout=$((timeout-1)) +done + +echo "Success!"