From 31e08e2fe8f876816540b4ed80ead73023ab6569 Mon Sep 17 00:00:00 2001 From: Orsiris de Jong Date: Sun, 4 Jun 2023 19:29:33 +0200 Subject: [PATCH] Update run_tests.sh --- dev/tests/run_tests.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/tests/run_tests.sh b/dev/tests/run_tests.sh index 4f9ce17..2b276ab 100755 --- a/dev/tests/run_tests.sh +++ b/dev/tests/run_tests.sh @@ -119,7 +119,7 @@ function SetupSSH { # Update remote conf files with SSH port sed -i.tmp 's#ssh://.*@localhost:[0-9]*/${HOME}/osync-tests/target#ssh://'$REMOTE_USER'@localhost:'$SSH_PORT'/${HOME}/osync-tests/target#' "$CONF_DIR/$REMOTE_CONF" - echp "ls -alh ${HOME}/.ssh" + echo "ls -alh ${HOME}/.ssh" ls -alh "${HOME}/.ssh" echo "cat ${HOME}/.ssh.authorized_keys" cat "${HOME}/.ssh/authorized_keys" @@ -333,14 +333,14 @@ function test_SSH { echo "Running SSH test as ${REMOTE_USER}" # SSH_PORT and SSH_USER are set by oneTimeSetup - ssh -i "${REMOTE_USER}/.ssh/${PUBKEY_NAME}" -p $SSH_PORT ${REMOTE_USER}@localhost "echo \"Remotely:\"; whoami; echo \"TEST OK\"" + $SUDO_CMD ssh -i "${REMOTE_USER}/.ssh/${PUBKEY_NAME}" -p $SSH_PORT ${REMOTE_USER}@localhost "echo \"Remotely:\"; whoami; echo \"TEST OK\"" if [ $? -ne 0 ]; then echo "SSH test failed" failure=true fi echo "Running SSH test as $(whoami)" - ssh -i "$(whoami)/.ssh/${PUBKEY_NAME}" -p $SSH_PORT $(whoami)@localhost "echo \"Remotely:\"; whoami; echo \"TEST OK\"" + $SUDO_CMD ssh -i "$(whoami)/.ssh/${PUBKEY_NAME}" -p $SSH_PORT $(whoami)@localhost "echo \"Remotely:\"; whoami; echo \"TEST OK\"" if [ $? -ne 0 ]; then echo "SSH test failed" failure=true