diff options
author | Lars Wirzenius <liw@liw.fi> | 2011-04-17 09:31:14 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2011-04-17 09:31:14 +0100 |
commit | 9d450f76bb887ee78cf0408ad99bf34b8f05dd84 (patch) | |
tree | 6a3d42a925cfeecbab2cbedc1d0dce092b3a2472 | |
parent | e698a180cc6d044951e38e2760e69890760932e3 (diff) | |
download | obnam-9d450f76bb887ee78cf0408ad99bf34b8f05dd84.tar.gz |
Remove encryption stuff for disk usage checks.
-rwxr-xr-x | blackboxtest | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/blackboxtest b/blackboxtest index 6177e666..e79dac07 100755 --- a/blackboxtest +++ b/blackboxtest @@ -331,6 +331,12 @@ class ObnamTestCase(unittest.TestCase): self.report_contents(self.data, origs) self.report_contents(self.restored, restoreds) raise Exception('spurious %s in restored data' % name) + + def remove_encryption_metadata(self, parent, subdir): + for x in ['key', 'userkeys']: + pathname = os.path.join(parent, subdir, x) + if os.path.exists(pathname): + os.remove(pathname) class RestoreTests(ObnamTestCase): @@ -464,6 +470,7 @@ class ForgetTests(ObnamTestCase): self.create_file(self.data, 'big', self.random_string(1024**2)) self.backup() self.forget(genids=self.generations()) + self.remove_encryption_metadata(self.repo, 'chunks') self.assertEqual(self.disk_usage(os.path.join(self.repo, 'chunks')), 0) @@ -476,6 +483,7 @@ class ForgetTests(ObnamTestCase): genids = self.generations() forgettable = genids[:-1] self.forget(genids=forgettable) + self.remove_encryption_metadata(self.repo, 'chunks') chunks = os.path.join(self.repo, 'chunks') self.assertEqual(self.disk_usage(chunks), 0) |