Merge #280 `[createrepo] Use more verbose output`

This commit is contained in:
Dennis Gilmore 2016-04-29 12:26:15 +00:00
commit 8615c96624
3 changed files with 7 additions and 6 deletions

View File

@ -36,7 +36,7 @@ class CreaterepoWrapper(object):
oldpackagedirs=None, num_deltas=None, workers=None):
# groupfile = /path/to/comps.xml
cmd = [self.createrepo, directory]
cmd = [self.createrepo, directory, '--verbose']
if baseurl:
cmd.append("--baseurl=%s" % baseurl)

View File

@ -18,7 +18,7 @@ class CreateRepoWrapperTest(unittest.TestCase):
cmd = repo.get_createrepo_cmd('/test/dir')
self.assertEqual(cmd[:2], ['createrepo_c', '/test/dir'])
self.assertItemsEqual(cmd[2:], ['--update', '--database', '--unique-md-filenames'])
self.assertItemsEqual(cmd[2:], ['--verbose', '--update', '--database', '--unique-md-filenames'])
def test_get_createrepo_c_cmd_full(self):
repo = CreaterepoWrapper()
@ -40,14 +40,15 @@ 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'])
'--outputdir=/test/output', '--verbose'])
def test_get_createrepo_cmd_minimal(self):
repo = CreaterepoWrapper(False)
cmd = repo.get_createrepo_cmd('/test/dir')
self.assertEqual(cmd[:2], ['createrepo', '/test/dir'])
self.assertItemsEqual(cmd[2:], ['--update', '--database', '--unique-md-filenames', '--pretty'])
self.assertItemsEqual(cmd[2:], ['--update', '--database', '--unique-md-filenames',
'--pretty', '--verbose'])
def test_get_createrepo_cmd_full(self):
repo = CreaterepoWrapper(False)
@ -69,4 +70,4 @@ 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'])
'--outputdir=/test/output', '--verbose'])

View File

@ -155,7 +155,7 @@ class TestCreateCompsRepo(PungiTestCase):
init.create_comps_repo(compose, 'x86_64')
self.assertEqual(run.mock_calls,
[mock.call(['createrepo_c', self.topdir + '/work/x86_64/comps_repo',
[mock.call(['createrepo_c', self.topdir + '/work/x86_64/comps_repo', '--verbose',
'--outputdir=%s/work/x86_64/comps_repo' % self.topdir,
'--groupfile=%s/work/x86_64/comps/comps-x86_64.xml' % self.topdir,
'--update', '--skip-stat', '--database', '--checksum=sha256',