X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=tests%2Fbasic;h=9308e21295115968964753e1825f4a46a3ef90b8;hb=03ff202d879440fce56abe7dbae1e50d88398b14;hp=c7c4b07fe8b79cdd95220a7f81238221dba45935;hpb=29c9d56d32df40c947b8cb2e67987b682b5184fe;p=monkeysphere.git diff --git a/tests/basic b/tests/basic index c7c4b07..9308e21 100755 --- a/tests/basic +++ b/tests/basic @@ -51,6 +51,8 @@ gpgadmin() { # test ssh connection # first argument is expected return code from ssh connection ssh_test() { + local RETURN=0 + umask 0077 CODE=${1:-0} @@ -65,20 +67,16 @@ ssh_test() { sleep 1 done - set +e - # make a client connection to the socket echo "##### starting ssh client..." ssh-agent bash -c \ - "monkeysphere subkey-to-ssh-agent && ssh -F $TEMPDIR/testuser/.ssh/config testhost true" - RETURN="$?" + "monkeysphere subkey-to-ssh-agent && ssh -F $TEMPDIR/testuser/.ssh/config testhost true" \ + || RETURN="$?" # kill the sshd process if it's still running kill "$SSHD_PID" SSHD_PID= - set -e - echo "##### return $RETURN" if [ "$RETURN" = "$CODE" ] ; then echo "##### ssh connection test returned as desired"