When cts_url is configured, use CTS /repo API for buildContainer yum_repourls.
Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
This commit is contained in:
parent
9612241396
commit
0530cf2712
2 changed files with 40 additions and 0 deletions
|
|
@ -364,6 +364,37 @@ class OSBSThreadTest(helpers.PungiTestCase):
|
|||
) as f:
|
||||
self.assertIn("baseurl=http://example.com/repo\n", f)
|
||||
|
||||
@mock.patch("pungi.phases.osbs.kojiwrapper.KojiWrapper")
|
||||
def test_run_with_extra_repos_with_cts(self, KojiWrapper):
|
||||
cfg = {
|
||||
"url": "git://example.com/repo?#BEEFCAFE",
|
||||
"target": "f24-docker-candidate",
|
||||
"git_branch": "f24-docker",
|
||||
"name": "my-name",
|
||||
"version": "1.0",
|
||||
"repo": [
|
||||
"Everything",
|
||||
],
|
||||
}
|
||||
self.compose.conf["cts_url"] = "http://cts.localhost"
|
||||
self._setupMock(KojiWrapper)
|
||||
self._assertConfigCorrect(cfg)
|
||||
|
||||
self.t.process((self.compose, self.compose.variants["Server"], cfg), 1)
|
||||
|
||||
cts_url = "http://cts.localhost/api/1/composes/%s" % self.compose.compose_id
|
||||
options = {
|
||||
"name": "my-name",
|
||||
"version": "1.0",
|
||||
"git_branch": "f24-docker",
|
||||
"yum_repourls": [
|
||||
"%s/repo/?variant=Server" % cts_url,
|
||||
"%s/repo/?variant=Everything" % cts_url,
|
||||
],
|
||||
}
|
||||
self._assertCorrectCalls(options)
|
||||
self._assertCorrectMetadata()
|
||||
|
||||
@mock.patch("pungi.phases.osbs.kojiwrapper.KojiWrapper")
|
||||
def test_run_with_deprecated_registry(self, KojiWrapper):
|
||||
cfg = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue