Skip to content

Commit

Permalink
Tests for different checksum type for RPMs and repodata files (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tojaj committed Jun 30, 2015
1 parent 3e7858d commit 11542fc
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions acceptance_tests/tests/test_createrepo.py
Expand Up @@ -227,3 +227,45 @@ def test_10_createrepo_compresstype_xz(self):
"[a-z0-9]{64}-other.sqlite.xz$",
],
additional_files_allowed=False)

def test_11_createrepo_repomd_checksum(self):
"""--checksum sha and --groupfile"""
res = self.assert_run_cr(self.indir,
"--repomd-checksum %(checksum)s --groupfile %(groupfile)s" % {
'checksum': "sha1",
'groupfile': self.fn_comps },
c=True)
self.assert_repo_sanity(res.outdir)
self.assert_repo_files(res.outdir,
["repomd.xml$",
"[a-z0-9]{40}-primary.xml.gz$",
"[a-z0-9]{40}-filelists.xml.gz$",
"[a-z0-9]{40}-other.xml.gz$",
"[a-z0-9]{40}-primary.sqlite.bz2$",
"[a-z0-9]{40}-filelists.sqlite.bz2$",
"[a-z0-9]{40}-other.sqlite.bz2$",
"[a-z0-9]{40}-comps.xml$",
"[a-z0-9]{40}-comps.xml.gz$",
],
additional_files_allowed=False)

def test_12_createrepo_repomd_checksum(self):
"""--checksum sha and --groupfile"""
res = self.assert_run_cr(self.indir,
"--checksum md5 --repomd-checksum %(checksum)s --groupfile %(groupfile)s" % {
'checksum': "sha1",
'groupfile': self.fn_comps },
c=True)
self.assert_repo_sanity(res.outdir)
self.assert_repo_files(res.outdir,
["repomd.xml$",
"[a-z0-9]{40}-primary.xml.gz$",
"[a-z0-9]{40}-filelists.xml.gz$",
"[a-z0-9]{40}-other.xml.gz$",
"[a-z0-9]{40}-primary.sqlite.bz2$",
"[a-z0-9]{40}-filelists.sqlite.bz2$",
"[a-z0-9]{40}-other.sqlite.bz2$",
"[a-z0-9]{40}-comps.xml$",
"[a-z0-9]{40}-comps.xml.gz$",
],
additional_files_allowed=False)

0 comments on commit 11542fc

Please sign in to comment.