summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2014-03-27 18:55:54 +0000
committerLars Wirzenius <liw@liw.fi>2014-03-27 18:55:54 +0000
commitfdfbd94b938a65e9f944d367ca86d21840fca1ad (patch)
treeeba5101e40b9047a98f2dbeeda8a93d8f819de04
parentbb13725e3e678efccd0ed6f5cb0c9e5cc4c218fb (diff)
downloadobnam-fdfbd94b938a65e9f944d367ca86d21840fca1ad.tar.gz
Remove cmdtest for bad file checksums
This is not currently testable without violating the repository interface abstraction, and that'd result in a bad test. I will fix this later.
-rw-r--r--tests/fail-on-bad-file-checksum.exit1
-rwxr-xr-xtests/fail-on-bad-file-checksum.script38
-rw-r--r--tests/fail-on-bad-file-checksum.stderr1
3 files changed, 0 insertions, 40 deletions
diff --git a/tests/fail-on-bad-file-checksum.exit b/tests/fail-on-bad-file-checksum.exit
deleted file mode 100644
index d00491fd..00000000
--- a/tests/fail-on-bad-file-checksum.exit
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/tests/fail-on-bad-file-checksum.script b/tests/fail-on-bad-file-checksum.script
deleted file mode 100755
index a4dade22..00000000
--- a/tests/fail-on-bad-file-checksum.script
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-# Copyright 2011 Lars Wirzenius
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# 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
-
-$SRCDIR/tests/backup
-
-# Remove the chunk checksum list, and then modify the chunks,
-# so that we can do a restore without triggering "bad chunk checksum"
-# errors. We only want to trigger the whole-file checksum error.
-
-rm -rf "$DATADIR/repo/chunklist/nodes"
-rm -rf "$DATADIR/repo/chunklist/refcounts"
-rm -rf "$DATADIR/repo/chunklist/metadata"
-
-find "$DATADIR/repo/chunks" -type f |
-while read filename
-do
- tr '\0-\377' '\200-\377\0-\177' < "$filename" > "$filename.new"
- mv "$filename.new" "$filename"
-done
-
-# Restore.
-$SRCDIR/tests/restore
-
diff --git a/tests/fail-on-bad-file-checksum.stderr b/tests/fail-on-bad-file-checksum.stderr
deleted file mode 100644
index decbe39c..00000000
--- a/tests/fail-on-bad-file-checksum.stderr
+++ /dev/null
@@ -1 +0,0 @@
-ERROR: RD6259X: There were errors when restoring