[ostree] Fix call to kobo.shortcuts.run

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2016-04-04 15:13:35 +02:00
parent 2ddaea5387
commit 5ff2d9f957
2 changed files with 4 additions and 4 deletions

View File

@ -22,13 +22,13 @@ def init_atomic_repo(repo, log_dir=None):
log_file = make_log_file(log_dir, 'init-atomic-repo') log_file = make_log_file(log_dir, 'init-atomic-repo')
if not os.path.isdir(repo): if not os.path.isdir(repo):
shortcuts.run(['ostree', 'init', '--repo={}'.format(repo), '--mode=archive-z2'], shortcuts.run(['ostree', 'init', '--repo={}'.format(repo), '--mode=archive-z2'],
log_file=log_file) logfile=log_file)
def make_ostree_repo(repo, config, log_dir=None): def make_ostree_repo(repo, config, log_dir=None):
log_file = make_log_file(log_dir, 'create-atomic-repo') log_file = make_log_file(log_dir, 'create-atomic-repo')
shortcuts.run(['rpm-ostree', 'compose', 'tree', '--repo={}'.format(repo), config], shortcuts.run(['rpm-ostree', 'compose', 'tree', '--repo={}'.format(repo), config],
log_file=log_file) logfile=log_file)
def run(opts): def run(opts):

View File

@ -28,10 +28,10 @@ class OstreeScriptTest(helpers.PungiTestCase):
self.assertItemsEqual( self.assertItemsEqual(
run.call_args_list, run.call_args_list,
[mock.call(['ostree', 'init', '--repo={}/atomic'.format(self.topdir), '--mode=archive-z2'], [mock.call(['ostree', 'init', '--repo={}/atomic'.format(self.topdir), '--mode=archive-z2'],
log_file=self.topdir + '/logs/Atomic/init-atomic-repo.log'), logfile=self.topdir + '/logs/Atomic/init-atomic-repo.log'),
mock.call(['rpm-ostree', 'compose', 'tree', '--repo={}/atomic'.format(self.topdir), mock.call(['rpm-ostree', 'compose', 'tree', '--repo={}/atomic'.format(self.topdir),
self.topdir + '/work/fedora-atomic-docker-host.json'], self.topdir + '/work/fedora-atomic-docker-host.json'],
log_file=self.topdir + '/logs/Atomic/create-atomic-repo.log')]) logfile=self.topdir + '/logs/Atomic/create-atomic-repo.log')])
if __name__ == '__main__': if __name__ == '__main__':