Clean up Phil's test more.
[rsync/rsync.git] / testsuite / ssh-basic.test
CommitLineData
3fedd74b
MP
1#!/bin/sh
2
3# Copyright (C) 1998,1999 Philip Hands <phil@hands.com>
4# Copyright (C) 2001 by Martin Pool <mbp@samba.org>
5
6# This program is distributable under the terms of the GNU GPL (see
7# COPYING)
8
9# This script tests ssh, if possible. It's called by runtests.sh
10
11. "$suitedir/rsync.fns"
12
13if ! type ssh >/dev/null 2>&1; then
14 echo "Skipping SSH tests because ssh is not in the path"
15 exit 77
16fi
17
18if ! [ "`ssh -o'BatchMode yes' localhost echo yes 2>/dev/null`" = "yes" ]; then
19 echo "Skipping SSH tests because ssh conection to localhost not authorised"
20 exit 77
21fi
22
23runtest "ssh: basic test" 'checkit "$RSYNC -avH -e ssh --rsync-path=$RSYNC ${FROM}/ localhost:${TO}" ${FROM}/ ${TO}'
24
25mv ${TO}/${F1} ${TO}/ThisShouldGo
26
27runtest "ssh: renamed file" 'checkit "$RSYNC --delete -avH -e ssh --rsync-path=$RSYNC ${FROM}/ localhost:${TO}" ${FROM}/ ${TO}'