From 407493a1aa7f74147551c57aaef581ee36524a9c Mon Sep 17 00:00:00 2001 From: Paul Caskey Date: Thu, 11 Oct 2018 22:37:46 -0400 Subject: [PATCH] bug fix in fulltest.sh --- tests/fulltest.sh | 51 ++++++++++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/tests/fulltest.sh b/tests/fulltest.sh index fd31b2d..8d16a7e 100755 --- a/tests/fulltest.sh +++ b/tests/fulltest.sh @@ -20,7 +20,8 @@ if [ $? -ne '0' ]; then curl -s -L -o webisoget-2.8.7-1.x86_64.rpm https://github.internet2.edu/docker/util/blob/master/bin/webisoget-2.8.7-1.x86_64.rpm?raw=true if [ -s webisoget-2.8.7-1.x86_64.rpm ]; then echo "installing rpm..." - rpm -ivh webisoget-2.8.7-1.x86_64.rpm + sudo rpm -ivh webisoget-2.8.7-1.x86_64.rpm + rm -f webisoget-2.8.7-1.x86_64.rpm else echo "can't get webisoget rpm..." exit 1 @@ -32,25 +33,35 @@ fi echo "Attempting full-cycle test..." webisoget -verbose -out lastpage.txt -formfile sptest.login -url https://sptest.example.edu:8443/secure/ &>/dev/null -cat lastpage.txt | grep kwhite@example.edu &>/dev/null -if [ $? == "0" ]; then - echo "The full-cycle test of the IdP and SP was successfull!" - echo "" - pushd ../test-compose &>/dev/null - ./decompose.sh -y &>/dev/null - popd &>/dev/null - rm -f lastpage.txt - popd &>/dev/null - exit 0 +if [ -s lastpage.txt ]; then + cat lastpage.txt | grep kwhite@example.edu &>/dev/null + if [ $? == "0" ]; then + echo "The full-cycle test of the IdP and SP was successfull!" + echo "" + pushd ../test-compose &>/dev/null + ./decompose.sh -y &>/dev/null + popd &>/dev/null + rm -f lastpage.txt + popd &>/dev/null + exit 0 + else + echo "The full-cycle test of the IdP and SP failed." + echo "" + pushd ../test-compose &>/dev/null + ./decompose.sh -y &>/dev/null + popd &>/dev/null + rm -f lastpage.txt + popd &>/dev/null + exit 1 + fi else - echo "The full-cycle test of the IdP and SP failed." - echo "" - pushd ../test-compose &>/dev/null - #./decompose.sh -y &>/dev/null - popd &>/dev/null - rm -f lastpage.txt - popd &>/dev/null - exit 1 + echo "The full-cycle test of the IdP and SP failed (no output)." + echo "" + pushd ../test-compose &>/dev/null + ./decompose.sh -y &>/dev/null + popd &>/dev/null + rm -f lastpage.txt + popd &>/dev/null + exit 1 fi -