diff options
author | Lars Wirzenius <liw@liw.fi> | 2014-03-27 18:56:57 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2014-03-27 18:56:57 +0000 |
commit | 29de9e039fe41ad6957b82cbb745e7d690598b7c (patch) | |
tree | ac9af9dd7e325d01958682bae411b7749329f06e | |
parent | fdfbd94b938a65e9f944d367ca86d21840fca1ad (diff) | |
download | obnam-29de9e039fe41ad6957b82cbb745e7d690598b7c.tar.gz |
Remove cmdtest for mangled chunks
This is not currently testable without violating the abstraction,
and I will introduce a better way of doing that, later.
-rw-r--r-- | tests/fail-on-mangled-chunk.exit | 1 | ||||
-rwxr-xr-x | tests/fail-on-mangled-chunk.script | 42 | ||||
-rw-r--r-- | tests/fail-on-mangled-chunk.stderr | 1 |
3 files changed, 0 insertions, 44 deletions
diff --git a/tests/fail-on-mangled-chunk.exit b/tests/fail-on-mangled-chunk.exit deleted file mode 100644 index d00491fd..00000000 --- a/tests/fail-on-mangled-chunk.exit +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/tests/fail-on-mangled-chunk.script b/tests/fail-on-mangled-chunk.script deleted file mode 100755 index c5bf4851..00000000 --- a/tests/fail-on-mangled-chunk.script +++ /dev/null @@ -1,42 +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 - -# Corrupt chunk files. -find "$DATADIR/repo/chunks" -type f -size +11c | -while read filename -do - - dd if="$filename" of="$filename.new" bs=1 count=10 2>/dev/null - dd if="$filename" bs=1 skip=10 2>/dev/null | \ - tr '\0-\377' '\200-\377\0-\177' >> "$filename.new" - mv "$filename.new" "$filename" -done - -# Restore. This will fail, and output an error, which contains a chunk id. -# Blot out the id. -if $SRCDIR/tests/restore 2> "$DATADIR/stderr" -then - cat "$DATADIR/stderr" 1>&2 - exit 0 -else - sed 's/chunk [[:digit:]]* checksum/chunk BLOTTED checksum/' \ - "$DATADIR/stderr" 1>&2 - exit 1 -fi diff --git a/tests/fail-on-mangled-chunk.stderr b/tests/fail-on-mangled-chunk.stderr deleted file mode 100644 index decbe39c..00000000 --- a/tests/fail-on-mangled-chunk.stderr +++ /dev/null @@ -1 +0,0 @@ -ERROR: RD6259X: There were errors when restoring |