From 065ceb6dd5afbdf47a4a2c4d50d1db8d937afb5f Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Tue, 7 Nov 2023 18:14:24 -0600 Subject: [PATCH] Update test --- tests/webapp-test/run-webapp-test.sh | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/tests/webapp-test/run-webapp-test.sh b/tests/webapp-test/run-webapp-test.sh index 5e341726..75c4cbd1 100755 --- a/tests/webapp-test/run-webapp-test.sh +++ b/tests/webapp-test/run-webapp-test.sh @@ -26,6 +26,8 @@ $TEST_TARGET_SO build-webapp --source-repo $CERC_REPO_BASE_DIR/test-progressive- UUID=`uuidgen` +set +e + CONTAINER_ID=$(docker run -p 3000:3000 -d cerc/test-progressive-web-app:local) sleep 3 wget -O test.before -m http://localhost:3000 @@ -36,17 +38,25 @@ CONTAINER_ID=$(docker run -p 3000:3000 -e CERC_WEBAPP_DEBUG=$UUID -d cerc/test-p sleep 3 wget -O test.after -m http://localhost:3000 -set +e +docker remove -f $CONTAINER_ID + +echo "###########################################################################" +echo "" + grep "$UUID" test.before > /dev/null if [ $? -ne 1 ]; then - echo "Found $UUID in before ouput." + echo "BEFORE: FAILED" exit 1 +else + echo "BEFORE: PASSED" fi -grep "$UUID" test.after > /dev/null +grep "`uuidgen`" test.after > /dev/null if [ $? -ne 0 ]; then - echo "Unable to find $UUID in after ouput." + echo "AFTER: FAILED" exit 1 +else + echo "AFTER: PASSED" fi - +exit 0 \ No newline at end of file