X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/3fedd74ba21c4dd9d64d384881271d19fc80dc47..d051056f921f465c487a85f9fa29a2324332bc4b:/testsuite/ssh-basic.test diff --git a/testsuite/ssh-basic.test b/testsuite/ssh-basic.test index e1aeb413..6ca587b1 100644 --- a/testsuite/ssh-basic.test +++ b/testsuite/ssh-basic.test @@ -10,18 +10,34 @@ . "$suitedir/rsync.fns" -if ! type ssh >/dev/null 2>&1; then - echo "Skipping SSH tests because ssh is not in the path" - exit 77 +if [ "x$rsync_enable_ssh_tests" != xyes ] +then + test_skipped "Skipping SSH tests because \$rsync_enable_ssh_tests is not set" fi -if ! [ "`ssh -o'BatchMode yes' localhost echo yes 2>/dev/null`" = "yes" ]; then - echo "Skipping SSH tests because ssh conection to localhost not authorised" - exit 77 +if ! type ssh >/dev/null ; then + test_skipped "Skipping SSH tests because ssh is not in the path" fi -runtest "ssh: basic test" 'checkit "$RSYNC -avH -e ssh --rsync-path=$RSYNC ${FROM}/ localhost:${TO}" ${FROM}/ ${TO}' +if ! [ "`ssh -o'BatchMode yes' localhost echo yes`" = "yes" ]; then + test_skipped "Skipping SSH tests because ssh conection to localhost not authorised" +fi + +# Added by Steve Bonds Feb 2 2003 +# Without this, there are no files in the $fromdir directory, so rsync has +# nothing to do. +hands_setup + +runtest "ssh: basic test" 'checkit "$RSYNC -avH -e ssh --rsync-path=\"$RSYNC\" \"$fromdir/\" \"localhost:$todir\"" "$fromdir/" "$todir"' + +# Added by Steve Bonds Feb 2 2003 +# I assumed that "F1" was intended to hold a single file for testing if +# rsync could detect a renamed file over ssh. Without this line below +# it was unset so the "mv" tried to move a parent directory into a +# subdirectory of itself. There is probably a better way of pulling out +# a sample file to rename. +F1=`ls "$todir" | head -5 | tail -1` -mv ${TO}/${F1} ${TO}/ThisShouldGo +mv "$todir/$F1" "$todir/ThisShouldGo" -runtest "ssh: renamed file" 'checkit "$RSYNC --delete -avH -e ssh --rsync-path=$RSYNC ${FROM}/ localhost:${TO}" ${FROM}/ ${TO}' +runtest "ssh: renamed file" 'checkit "$RSYNC --delete -avH -e ssh --rsync-path=\"$RSYNC\" \"$fromdir/\" \"localhost:$todir\"" "$fromdir/" "$todir"'