diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 16:14:31 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 16:14:31 +0000 |
commit | 2d5707c7479eacb3b1ad98e01b53f56a88f8fb78 (patch) | |
tree | d9c334e83692851c02e3e1b8e65570c97bc82481 /testsuite/ssh-basic.test | |
parent | Initial commit. (diff) | |
download | rsync-2d5707c7479eacb3b1ad98e01b53f56a88f8fb78.tar.xz rsync-2d5707c7479eacb3b1ad98e01b53f56a88f8fb78.zip |
Adding upstream version 3.2.7.upstream/3.2.7
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testsuite/ssh-basic.test')
-rw-r--r-- | testsuite/ssh-basic.test | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/testsuite/ssh-basic.test b/testsuite/ssh-basic.test new file mode 100644 index 0000000..1559ca2 --- /dev/null +++ b/testsuite/ssh-basic.test @@ -0,0 +1,34 @@ +#!/bin/sh + +# Copyright (C) 1998,1999 Philip Hands <phil@hands.com> +# Copyright (C) 2001 by Martin Pool <mbp@samba.org> + +# This program is distributable under the terms of the GNU GPL (see +# COPYING) + +# This script tests ssh, if possible. It's called by runtests.sh + +. "$suitedir/rsync.fns" + +SSH="$scratchdir/src/support/lsh.sh" + +if test x"$rsync_enable_ssh_tests" = xyes; then + if type ssh >/dev/null; then + SSH=ssh + fi +fi + +if [ "`$SSH -o'BatchMode yes' localhost echo yes`" != "yes" ]; then + test_skipped "Skipping SSH tests because ssh connection to localhost not authorised" +fi + +echo "Using remote shell: $SSH" + +# Create some files for rsync to copy +hands_setup + +runtest "ssh: basic test" 'checkit "$RSYNC -avH -e \"$SSH\" --rsync-path=\"$RSYNC\" \"$fromdir/\" \"localhost:$todir\"" "$fromdir/" "$todir"' + +mv "$todir/text" "$todir/ThisShouldGo" + +runtest "ssh: renamed file" 'checkit "$RSYNC --delete -avH -e \"$SSH\" --rsync-path=\"$RSYNC\" \"$fromdir/\" \"localhost:$todir\"" "$fromdir/" "$todir"' |