Tests: Add acceptance test for --general-compress-type option
authorTomas Mlcoch <tmlcoch@redhat.com>
Thu, 8 Oct 2015 09:43:12 +0000 (11:43 +0200)
committerTomas Mlcoch <tmlcoch@redhat.com>
Thu, 8 Oct 2015 09:43:12 +0000 (11:43 +0200)
Added test_13_createrepo_general_compress_type test

acceptance_tests/tests/test_createrepo.py

index 1735c2b1a99d7c102e75fb9ecead18674bc342a4..3e6e92369610b4c4324fb44f06f83b448e4c6a25 100644 (file)
@@ -268,4 +268,25 @@ class TestCaseCreaterepo_emptyrepo(BaseTestCase):
                                 "[a-z0-9]{40}-comps.xml$",
                                 "[a-z0-9]{40}-comps.xml.gz$",
                                 ],
+                               additional_files_allowed=False)
+
+    def test_13_createrepo_general_compress_type(self):
+        """--checksum sha and --groupfile"""
+        res = self.assert_run_cr(self.indir,
+                                 "--general-compress-type %(compress_type)s --groupfile %(groupfile)s" % {
+                                    'compress_type': "xz",
+                                    'groupfile': self.fn_comps },
+                                 c=True)
+        self.assert_repo_sanity(res.outdir)
+        self.assert_repo_files(res.outdir,
+                               ["repomd.xml$",
+                                "[a-z0-9]+-primary.xml.xz$",
+                                "[a-z0-9]+-filelists.xml.xz$",
+                                "[a-z0-9]+-other.xml.xz$",
+                                "[a-z0-9]+-primary.sqlite.xz$",
+                                "[a-z0-9]+-filelists.sqlite.xz$",
+                                "[a-z0-9]+-other.sqlite.xz$",
+                                "[a-z0-9]+-comps.xml$",
+                                "[a-z0-9]+-comps.xml.xz$",
+                                ],
                                additional_files_allowed=False)
\ No newline at end of file