Add compose_id to repoclosure/lookaside directory names
JIRA: COMPOSE-3616 Signed-off-by: Haibo Lin <hlin@redhat.com>
This commit is contained in:
parent
e9a363bfde
commit
c00162413c
@ -52,12 +52,12 @@ def run_repoclosure(compose):
|
|||||||
|
|
||||||
lookaside = {}
|
lookaside = {}
|
||||||
if variant.parent:
|
if variant.parent:
|
||||||
repo_id = "repoclosure-%s.%s" % (variant.parent.uid, arch)
|
repo_id = "repoclosure-%s-%s.%s" % (compose.compose_id, variant.parent.uid, arch)
|
||||||
repo_dir = compose.paths.compose.repository(arch=arch, variant=variant.parent)
|
repo_dir = compose.paths.compose.repository(arch=arch, variant=variant.parent)
|
||||||
lookaside[repo_id] = repo_dir
|
lookaside[repo_id] = repo_dir
|
||||||
|
|
||||||
repos = {}
|
repos = {}
|
||||||
repo_id = "repoclosure-%s.%s" % (variant.uid, arch)
|
repo_id = "repoclosure-%s-%s.%s" % (compose.compose_id, variant.uid, arch)
|
||||||
repo_dir = compose.paths.compose.repository(arch=arch, variant=variant)
|
repo_dir = compose.paths.compose.repository(arch=arch, variant=variant)
|
||||||
repos[repo_id] = repo_dir
|
repos[repo_id] = repo_dir
|
||||||
|
|
||||||
|
@ -289,10 +289,10 @@ class TestRepoclosure(PungiTestCase):
|
|||||||
super(TestRepoclosure, self).setUp()
|
super(TestRepoclosure, self).setUp()
|
||||||
self.maxDiff = None
|
self.maxDiff = None
|
||||||
|
|
||||||
def _get_repo(self, variant, arch, path=None):
|
def _get_repo(self, compose_id, variant, arch, path=None):
|
||||||
path = path or arch + '/os'
|
path = path or arch + '/os'
|
||||||
return {
|
return {
|
||||||
'repoclosure-%s.%s' % (variant, arch): self.topdir + '/compose/%s/%s' % (variant, path)
|
'repoclosure-%s-%s.%s' % (compose_id, variant, arch): self.topdir + '/compose/%s/%s' % (variant, path)
|
||||||
}
|
}
|
||||||
|
|
||||||
@mock.patch('pungi.wrappers.repoclosure.get_repoclosure_cmd')
|
@mock.patch('pungi.wrappers.repoclosure.get_repoclosure_cmd')
|
||||||
@ -316,15 +316,15 @@ class TestRepoclosure(PungiTestCase):
|
|||||||
self.assertItemsEqual(
|
self.assertItemsEqual(
|
||||||
mock_grc.call_args_list,
|
mock_grc.call_args_list,
|
||||||
[mock.call(backend='yum', arch=['amd64', 'x86_64', 'noarch'], lookaside={},
|
[mock.call(backend='yum', arch=['amd64', 'x86_64', 'noarch'], lookaside={},
|
||||||
repos=self._get_repo('Everything', 'amd64')),
|
repos=self._get_repo(compose.compose_id, 'Everything', 'amd64')),
|
||||||
mock.call(backend='yum', arch=['amd64', 'x86_64', 'noarch'], lookaside={},
|
mock.call(backend='yum', arch=['amd64', 'x86_64', 'noarch'], lookaside={},
|
||||||
repos=self._get_repo('Client', 'amd64')),
|
repos=self._get_repo(compose.compose_id, 'Client', 'amd64')),
|
||||||
mock.call(backend='yum', arch=['amd64', 'x86_64', 'noarch'], lookaside={},
|
mock.call(backend='yum', arch=['amd64', 'x86_64', 'noarch'], lookaside={},
|
||||||
repos=self._get_repo('Server', 'amd64')),
|
repos=self._get_repo(compose.compose_id, 'Server', 'amd64')),
|
||||||
mock.call(backend='yum', arch=['x86_64', 'noarch'], lookaside={},
|
mock.call(backend='yum', arch=['x86_64', 'noarch'], lookaside={},
|
||||||
repos=self._get_repo('Server', 'x86_64')),
|
repos=self._get_repo(compose.compose_id, 'Server', 'x86_64')),
|
||||||
mock.call(backend='yum', arch=['x86_64', 'noarch'], lookaside={},
|
mock.call(backend='yum', arch=['x86_64', 'noarch'], lookaside={},
|
||||||
repos=self._get_repo('Everything', 'x86_64'))])
|
repos=self._get_repo(compose.compose_id, 'Everything', 'x86_64'))])
|
||||||
|
|
||||||
@mock.patch('pungi.wrappers.repoclosure.get_repoclosure_cmd')
|
@mock.patch('pungi.wrappers.repoclosure.get_repoclosure_cmd')
|
||||||
@mock.patch('pungi.phases.test.run')
|
@mock.patch('pungi.phases.test.run')
|
||||||
@ -335,15 +335,15 @@ class TestRepoclosure(PungiTestCase):
|
|||||||
self.assertItemsEqual(
|
self.assertItemsEqual(
|
||||||
mock_grc.call_args_list,
|
mock_grc.call_args_list,
|
||||||
[mock.call(backend='dnf', arch=['amd64', 'x86_64', 'noarch'], lookaside={},
|
[mock.call(backend='dnf', arch=['amd64', 'x86_64', 'noarch'], lookaside={},
|
||||||
repos=self._get_repo('Everything', 'amd64')),
|
repos=self._get_repo(compose.compose_id, 'Everything', 'amd64')),
|
||||||
mock.call(backend='dnf', arch=['amd64', 'x86_64', 'noarch'], lookaside={},
|
mock.call(backend='dnf', arch=['amd64', 'x86_64', 'noarch'], lookaside={},
|
||||||
repos=self._get_repo('Client', 'amd64')),
|
repos=self._get_repo(compose.compose_id, 'Client', 'amd64')),
|
||||||
mock.call(backend='dnf', arch=['amd64', 'x86_64', 'noarch'], lookaside={},
|
mock.call(backend='dnf', arch=['amd64', 'x86_64', 'noarch'], lookaside={},
|
||||||
repos=self._get_repo('Server', 'amd64')),
|
repos=self._get_repo(compose.compose_id, 'Server', 'amd64')),
|
||||||
mock.call(backend='dnf', arch=['x86_64', 'noarch'], lookaside={},
|
mock.call(backend='dnf', arch=['x86_64', 'noarch'], lookaside={},
|
||||||
repos=self._get_repo('Server', 'x86_64')),
|
repos=self._get_repo(compose.compose_id, 'Server', 'x86_64')),
|
||||||
mock.call(backend='dnf', arch=['x86_64', 'noarch'], lookaside={},
|
mock.call(backend='dnf', arch=['x86_64', 'noarch'], lookaside={},
|
||||||
repos=self._get_repo('Everything', 'x86_64'))])
|
repos=self._get_repo(compose.compose_id, 'Everything', 'x86_64'))])
|
||||||
|
|
||||||
@mock.patch("glob.glob")
|
@mock.patch("glob.glob")
|
||||||
@mock.patch("pungi.wrappers.repoclosure.extract_from_fus_log")
|
@mock.patch("pungi.wrappers.repoclosure.extract_from_fus_log")
|
||||||
@ -399,9 +399,9 @@ class TestRepoclosure(PungiTestCase):
|
|||||||
self.assertItemsEqual(
|
self.assertItemsEqual(
|
||||||
mock_grc.call_args_list,
|
mock_grc.call_args_list,
|
||||||
[mock.call(backend='dnf', arch=['amd64', 'x86_64', 'noarch'], lookaside={},
|
[mock.call(backend='dnf', arch=['amd64', 'x86_64', 'noarch'], lookaside={},
|
||||||
repos=self._get_repo('Server', 'amd64')),
|
repos=self._get_repo(compose.compose_id, 'Server', 'amd64')),
|
||||||
mock.call(backend='dnf', arch=['x86_64', 'noarch'], lookaside={},
|
mock.call(backend='dnf', arch=['x86_64', 'noarch'], lookaside={},
|
||||||
repos=self._get_repo('Server', 'x86_64')),
|
repos=self._get_repo(compose.compose_id, 'Server', 'x86_64')),
|
||||||
])
|
])
|
||||||
|
|
||||||
@mock.patch('pungi.wrappers.repoclosure.get_repoclosure_cmd')
|
@mock.patch('pungi.wrappers.repoclosure.get_repoclosure_cmd')
|
||||||
|
Loading…
Reference in New Issue
Block a user