Skip to content

Commit

Permalink
Added simple test for glassfish and updated commit
Browse files Browse the repository at this point in the history
Signed-off-by: David Matějček <[email protected]>
  • Loading branch information
dmatej committed Feb 23, 2023
1 parent 4afd28d commit 8034003
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion library/glassfish
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Maintainers: David Matejcek <[email protected]> (@dmatej),
Ondro Mihalyi <[email protected]> (@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
Expand Down
3 changes: 3 additions & 0 deletions test/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ imageTests+=(
[ghost]='
ghost-basics
'
[glassfish]='
glassfish
'
[golang]='
golang-hello-world
'
Expand Down
21 changes: 21 additions & 0 deletions test/tests/glassfish/run.sh
Original file line number Diff line number Diff line change
@@ -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!"

0 comments on commit 8034003

Please sign in to comment.