From e0b34b56846d7749c9f28676f6c9dc85722f2ba3 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Thu, 2 Nov 2017 09:29:08 +0100 Subject: profile: Do not compress package Manifests in old-ebuild --- tests/test_profile.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'tests/test_profile.py') diff --git a/tests/test_profile.py b/tests/test_profile.py index 75da1d5..adcdf04 100644 --- a/tests/test_profile.py +++ b/tests/test_profile.py @@ -153,3 +153,28 @@ class BackwardsCompatEbuildRepositoryTests(EbuildRepositoryTests): self.assertEqual( m.find_path_entry('dev-foo/bar/files/test.patch').aux_path, 'test.patch') + + def test_compression(self): + """ + Test that package directory Manifests are not compressed. + """ + + m = gemato.recursiveloader.ManifestRecursiveLoader( + os.path.join(self.dir, 'Manifest'), + hashes=['SHA256', 'SHA512'], + compress_watermark=0, + allow_create=True, + profile=self.PROFILE()) + m.update_entries_for_directory('') + m.save_manifests() + + for mpath in self.EXPECTED_MANIFESTS: + # package manifest should be left uncompressed + if mpath == 'dev-foo/bar/Manifest': + self.assertTrue(os.path.exists(os.path.join( + self.dir, mpath))) + else: + self.assertTrue(os.path.exists(os.path.join( + self.dir, mpath + '.gz'))) + self.assertFalse(os.path.exists(os.path.join( + self.dir, mpath))) -- cgit v1.2.3