Skip to content

Commit

Permalink
bug fix in fulltest.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
pcaskey committed Oct 12, 2018
1 parent 1828465 commit 407493a
Showing 1 changed file with 31 additions and 20 deletions.
51 changes: 31 additions & 20 deletions tests/fulltest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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


0 comments on commit 407493a

Please sign in to comment.