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
|
|
@ -1,3 +1,11 @@
|
|||
[koji.localhost.kerberos]
|
||||
[koji]
|
||||
allowed_domains = ["localhost", "composer", "::1"]
|
||||
ca = "/etc/osbuild-composer/ca-crt.pem"
|
||||
|
||||
[koji.servers.localhost.kerberos]
|
||||
principal = "osbuild-krb@LOCAL"
|
||||
keytab = "/etc/osbuild-composer/client.keytab"
|
||||
|
||||
[worker]
|
||||
allowed_domains = ["localhost", "composer"]
|
||||
ca = "/etc/osbuild-composer/ca-crt.pem"
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ greenprint "Copying credentials and certificates"
|
|||
sudo test/copy-creds.sh
|
||||
|
||||
greenprint "Testing Koji hub API access"
|
||||
koji --server=http://localhost/kojihub --user=osbuild --password=osbuildpass --authtype=password hello
|
||||
koji --server=http://localhost:8080/kojihub --user=osbuild --password=osbuildpass --authtype=password hello
|
||||
|
||||
greenprint "Starting koji builder"
|
||||
sudo ./run-builder.sh start
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ class TestIntegration(unittest.TestCase):
|
|||
|
||||
def setUp(self):
|
||||
global_args = dict(
|
||||
server="http://localhost/kojihub",
|
||||
server="http://localhost:8080/kojihub",
|
||||
user="kojiadmin",
|
||||
password="kojipass",
|
||||
authtype="password")
|
||||
|
|
|
|||
|
|
@ -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