diff options
-rwxr-xr-x | tests/compression.script | 22 | ||||
-rw-r--r-- | yarns/0070-compression.yarn | 29 |
2 files changed, 29 insertions, 22 deletions
diff --git a/tests/compression.script b/tests/compression.script deleted file mode 100755 index 1b5b8dfa..00000000 --- a/tests/compression.script +++ /dev/null @@ -1,22 +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 --compress-with=gzip -$SRCDIR/tests/restore --compress-with=gzip -$SRCDIR/tests/verify - diff --git a/yarns/0070-compression.yarn b/yarns/0070-compression.yarn new file mode 100644 index 00000000..bf7976ee --- /dev/null +++ b/yarns/0070-compression.yarn @@ -0,0 +1,29 @@ +Compressed repositories +======================= + +Compressed backups should work just like normal ones, except with all +the data written to the repository being compressed. We thus repeat a +basic backup test, but with compression. + + SCENARIO backup simple data using compression + GIVEN 100kB of new data in directory L + AND a manifest of L in M + AND user U sets configuration compress-with to deflate + WHEN user U backs up directory L to repository R + AND user U restores their latest generation in repository R into X + THEN L, restored to X, matches manifest M + AND user U can fsck the repository R + +If this works, everything else should work as well: by the time Obnam +writes anything to the repository, it has lost its sparseness, or +other special filesystem characteristics, and it's just B-tree nodes +or chunk data. + +It should be possible to restore from a compressed repository, even +without turning compression on. We continue the test scenario +accordingly. + + GIVEN user U sets configuration compress-with to none + WHEN user U restores their latest generation in repository R into Y + THEN L, restored to Y, matches manifest M + AND user U can fsck the repository R |