mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-04-04 06:32:10 -04:00
Clean up Phil's test more.
Make the checkit() routine more generic. Split out ssh tests.
This commit is contained in:
27
testsuite/ssh-basic.test
Normal file
27
testsuite/ssh-basic.test
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/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"
|
||||
|
||||
if ! type ssh >/dev/null 2>&1; then
|
||||
echo "Skipping SSH tests because ssh is not in the path"
|
||||
exit 77
|
||||
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
|
||||
fi
|
||||
|
||||
runtest "ssh: basic test" 'checkit "$RSYNC -avH -e ssh --rsync-path=$RSYNC ${FROM}/ localhost:${TO}" ${FROM}/ ${TO}'
|
||||
|
||||
mv ${TO}/${F1} ${TO}/ThisShouldGo
|
||||
|
||||
runtest "ssh: renamed file" 'checkit "$RSYNC --delete -avH -e ssh --rsync-path=$RSYNC ${FROM}/ localhost:${TO}" ${FROM}/ ${TO}'
|
||||
Reference in New Issue
Block a user