summaryrefslogtreecommitdiff
path: root/testsuite/ssh-basic.test
diff options
context:
space:
mode:
authorMartin Pool <mbp@samba.org>2001-08-29 09:13:01 +0000
committerMartin Pool <mbp@samba.org>2001-08-29 09:13:01 +0000
commit3fedd74ba21c4dd9d64d384881271d19fc80dc47 (patch)
tree4400d43c72f9741330f8621e2881e5a967ab9e3d /testsuite/ssh-basic.test
parent78ffe4787fbe6c3d175d9196ef4c2bc9f4521b5f (diff)
downloadrsync-3fedd74ba21c4dd9d64d384881271d19fc80dc47.tar.gz
Clean up Phil's test more.
Make the checkit() routine more generic. Split out ssh tests.
Diffstat (limited to 'testsuite/ssh-basic.test')
-rw-r--r--testsuite/ssh-basic.test27
1 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/ssh-basic.test b/testsuite/ssh-basic.test
new file mode 100644
index 00000000..e1aeb413
--- /dev/null
+++ b/testsuite/ssh-basic.test
@@ -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}'