cleanup of how ssh_test return code is captured in tests/basic
[monkeysphere.git] / tests / basic
index f76a265ea43bd388ea3fff022ca16b8f50fdd112..a3d32b49868631cf6711ebdcacee6973f81dbcc0 100755 (executable)
@@ -57,20 +57,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"