createrepo: Allow passing arbitrary arguments

This could be used to enable zchunk generation, which can require up to
4 different options. Instead of hardcoding every single one, let's just
allow more direct access to the executed command.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2018-08-08 16:15:51 +02:00
parent b12deab153
commit 2fa1f09827
6 changed files with 40 additions and 22 deletions

View file

@ -32,7 +32,8 @@ class CreateRepoWrapperTest(unittest.TestCase):
split=True, pretty=False, database=False, checksum='sha256', unique_md_filenames=False,
distro='Fedora', content=['c1', 'c2'], repo=['r1', 'r2'], revision='rev', deltas=True,
oldpackagedirs='/test/old', num_deltas=2, workers=3, outputdir='/test/output',
use_xz=True
use_xz=True,
extra_args=["--zck", "--zck-primary-dict=/foo/bar"],
)
self.maxDiff = None
@ -44,7 +45,7 @@ class CreateRepoWrapperTest(unittest.TestCase):
'--checksum=sha256', '--distro=Fedora', '--simple-md-filenames', '--no-database',
'--content=c1', '--content=c2', '--repo=r1', '--repo=r2', '--revision=rev',
'--deltas', '--oldpackagedirs=/test/old', '--num-deltas=2', '--workers=3',
'--outputdir=/test/output', '--xz'])
'--outputdir=/test/output', '--xz', "--zck", "--zck-primary-dict=/foo/bar"])
def test_get_createrepo_cmd_minimal(self):
repo = CreaterepoWrapper(False)