summaryrefslogtreecommitdiff
path: root/tests/test_recursiveloader.py
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-11-02 09:24:44 +0100
committerMichał Górny <mgorny@gentoo.org>2017-11-02 09:24:44 +0100
commitf53e6a5cdf4f345cb005ac34a61fa26704c1d288 (patch)
tree5667879743a0c15d2a894082143c26b7888f2fa3 /tests/test_recursiveloader.py
parentcf5762cfd1dd07bbcf12987b32afaafca41ec527 (diff)
downloadgemato-f53e6a5cdf4f345cb005ac34a61fa26704c1d288.tar.gz
recursiveloader: Fix updating deeply nested compressed Manifests
Diffstat (limited to 'tests/test_recursiveloader.py')
-rw-r--r--tests/test_recursiveloader.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_recursiveloader.py b/tests/test_recursiveloader.py
index c115763..a5ee83a 100644
--- a/tests/test_recursiveloader.py
+++ b/tests/test_recursiveloader.py
@@ -590,6 +590,16 @@ OPTIONAL nonstray
self.assertNotEqual(m.find_timestamp().ts,
datetime.datetime(2017, 1, 1, 1, 1, 1))
+ def test_compress_manifests_low_watermark(self):
+ m = gemato.recursiveloader.ManifestRecursiveLoader(
+ os.path.join(self.dir, 'Manifest'),
+ hashes=['SHA256', 'SHA512'])
+ m.save_manifests(force=True, compress_watermark=0)
+ self.assertFalse(os.path.exists(
+ os.path.join(self.dir, 'Manifest')))
+ self.assertTrue(os.path.exists(
+ os.path.join(self.dir, 'Manifest.gz')))
+
class MultipleManifestTest(TempDirTestCase):
DIRS = ['sub']