summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2012-05-24 18:38:25 +0200
committerLars Wirzenius <liw@liw.fi>2012-05-24 18:38:25 +0200
commit51d2314138c54837c940cfac96eb50bc72fe5671 (patch)
treedcab782d202a6f0fe0d48b6660d1a4e745ebd8cd
parent698dddcebed48f78648cbb5808a067a7b5247b79 (diff)
downloadobnam-51d2314138c54837c940cfac96eb50bc72fe5671.tar.gz
Handle network tests correctly
-rwxr-xr-xtests/backup-pretend.script6
-rwxr-xr-xtests/restores-compressed-without-being-told-to.script2
-rwxr-xr-xtests/xattr-change-only.script17
3 files changed, 14 insertions, 11 deletions
diff --git a/tests/backup-pretend.script b/tests/backup-pretend.script
index 298529ac..0cb4f362 100755
--- a/tests/backup-pretend.script
+++ b/tests/backup-pretend.script
@@ -14,10 +14,10 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-set -e
+set -eu
$SRCDIR/tests/backup
-summain -r "$(cat $DATADIR/repourl)"/metadata > "$DATADIR/repo.summain"
+summain -r "$DATADIR/repo/metadata" > "$DATADIR/repo.summain"
$SRCDIR/tests/backup --pretend
-summain -r "$(cat $DATADIR/repourl)"/metadata > "$DATADIR/repo2.summain"
+summain -r "$DATADIR/repo/metadata" > "$DATADIR/repo2.summain"
diff -u "$DATADIR/repo.summain" "$DATADIR/repo2.summain"
diff --git a/tests/restores-compressed-without-being-told-to.script b/tests/restores-compressed-without-being-told-to.script
index 545954ee..ce7d2afc 100755
--- a/tests/restores-compressed-without-being-told-to.script
+++ b/tests/restores-compressed-without-being-told-to.script
@@ -17,7 +17,7 @@
set -e
root="$(cat $DATADIR/rooturl)"
-genbackupdata "$root" --create=100k --quiet
+genbackupdata "$DATADIR/data" --create=100k --quiet
$SRCDIR/tests/backup --compress-with=gzip
$SRCDIR/tests/restore
$SRCDIR/tests/verify
diff --git a/tests/xattr-change-only.script b/tests/xattr-change-only.script
index 20e81f22..e22c4121 100755
--- a/tests/xattr-change-only.script
+++ b/tests/xattr-change-only.script
@@ -19,12 +19,15 @@
set -eu
-echo foo > "$DATADIR/data/foo"
-$SRCDIR/tests/backup
+# This only works with local filesystem access, not over sftp.
+if [ "$OBNAM_TEST_SFTP_ROOT" != yes ]
+then
+ echo foo > "$DATADIR/data/foo"
+ $SRCDIR/tests/backup
-setfattr --name=user.foo --value=bar "$DATADIR/data/foo"
-
-$SRCDIR/tests/backup
-$SRCDIR/tests/restore
-$SRCDIR/tests/verify
+ setfattr --name=user.foo --value=bar "$DATADIR/data/foo"
+ $SRCDIR/tests/backup
+ $SRCDIR/tests/restore
+ $SRCDIR/tests/verify
+fi