Skip to content

Commit c2cd35c

Browse files
authored
Merge pull request #272 from OpenLiberty/staging
Merge staging to prod - improve test (#271)
2 parents 63ff3a3 + 36fd2f6 commit c2cd35c

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

scripts/testApp.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,24 @@ mvn -Dhttp.keepAlive=false \
3838
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120 \
3939
-Dcontext.root=/dev/ failsafe:integration-test liberty:stop
4040
mvn failsafe:verify
41+
42+
# TEST 3: packaging and running the application jar
4143
mvn liberty:package -Dinclude=runnable
4244
if [ ! -f "target/guide-getting-started.jar" ]; then
4345
echo "target/guide-getting-started.jar was not generated!"
4446
exit 1
4547
fi
48+
java -jar target/guide-getting-started.jar &
49+
GGS_PID=$!
50+
echo "GGS_PID=$GGS_PID"
51+
sleep 60
52+
status="$(curl --write-out "%{http_code}\n" --silent --output /dev/null "http://localhost:9080/dev/system/properties")"
53+
kill $GGS_PID
54+
if [ "$status" == "200" ]
55+
then
56+
echo ENDPOINT OK
57+
else
58+
echo "$status"
59+
echo ENDPOINT NOT OK
60+
exit 1
61+
fi

0 commit comments

Comments
 (0)