all: sync with composer changes
Upstream composer has introduce a few changes that we need to adapt for: - the koji composer API is now exposed on the standard https port (443). Thus koji hub and web need to move to a different pair: 8080 (http) and 4343 (https). Change the scripts and tests for that - the koji API gained a prefix 'api/composer-koji/v1/'. Change client and unit tests to use that prefix. Use urljoin to create new APIs - composer configuration format (osbuild-composer.toml) has changed and now also includes configuration for the CA and allowed domains - update the composer RPM repositories to the commit for the 21 upstream release.
This commit is contained in:
parent
3b9980df50
commit
b9c3a3d2f9
11 changed files with 34 additions and 20 deletions
|
|
@ -7,6 +7,7 @@ import json
|
|||
import os
|
||||
import sys
|
||||
import tempfile
|
||||
import urllib.parse
|
||||
import uuid
|
||||
import unittest.mock
|
||||
from flexmock import flexmock
|
||||
|
|
@ -17,9 +18,12 @@ import httpretty
|
|||
from plugintest import PluginTest
|
||||
|
||||
|
||||
API_BASE = "api/composer-koji/v1/"
|
||||
|
||||
|
||||
class MockComposer:
|
||||
def __init__(self, url, *, architectures=["x86_64"]):
|
||||
self.url = url
|
||||
self.url = urllib.parse.urljoin(url, API_BASE)
|
||||
self.architectures = architectures[:]
|
||||
self.composes = {}
|
||||
self.errors = []
|
||||
|
|
@ -29,7 +33,7 @@ class MockComposer:
|
|||
def httpretty_regsiter(self):
|
||||
httpretty.register_uri(
|
||||
httpretty.POST,
|
||||
self.url + "compose",
|
||||
urllib.parse.urljoin(self.url, "compose"),
|
||||
body=self.compose_create
|
||||
)
|
||||
|
||||
|
|
@ -68,7 +72,7 @@ class MockComposer:
|
|||
|
||||
httpretty.register_uri(
|
||||
httpretty.GET,
|
||||
self.url + "compose/" + compose_id,
|
||||
urllib.parse.urljoin(self.url, "compose/" + compose_id),
|
||||
body=self.compose_status
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue