Skip to content

Commit 5b925c8

Browse files
committed
Added simple test for glassfish and updated commit
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
1 parent 4afd28d commit 5b925c8

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

library/glassfish

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Maintainers: David Matejcek <david.matejcek@omnifish.ee> (@dmatej),
33
Ondro Mihalyi <ondro.mihalyi@omnifish.ee> (@ondromih)
44
GitRepo: https://github.com/OmniFish-EE/docker-library-glassfish.git
55
GitFetch: refs/heads/main
6-
GitCommit: f7c6e852939b321ca1f9bb2ddeacab4df2ed0bc1
6+
GitCommit: 12efd43d7633d89cb28edf3a5b0cf3c12ac31c1f
77

88
Tags: 7.0.0, 7.0.0-jdk17, 7.0.0-jdk17-eclipse-temurin
99
Architectures: amd64

test/config.sh

+3
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ imageTests+=(
7676
[ghost]='
7777
ghost-basics
7878
'
79+
[glassfish]='
80+
glassfish
81+
'
7982
[golang]='
8083
golang-hello-world
8184
'

test/tests/glassfish/run.sh

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
set -eo pipefail
3+
4+
serverImage="$1"
5+
containerId="$(docker run -d "$serverImage")"
6+
trap "docker rm -vf $containerId > /dev/null" EXIT
7+
8+
logLine='^\s+Eclipse GlassFish\s+[\.0-9]+'
9+
timeout=10
10+
11+
until docker logs $containerId 2>&1 | grep -q -E "$logLine"
12+
do
13+
if [ $timeout -eq 0 ]
14+
then
15+
exit 100;
16+
fi
17+
sleep 1
18+
timeout=$((timeout-1))
19+
done
20+
21+
echo "Success!"

0 commit comments

Comments
 (0)