From 4ca2cb9a1a1568eef59e7dbb7f250a1e4bbd5f6d Mon Sep 17 00:00:00 2001 From: Lubomír Sedlář Date: May 04 2023 08:48:10 +0000 Subject: pulp: Stop stripping https The reason for this no longer applies. If Pulp redirects to HTTPS, ODCS should not do anything about that. JIRA: RHELCMP-11655 --- diff --git a/server/odcs/server/pulp.py b/server/odcs/server/pulp.py index 3283214..1d58184 100644 --- a/server/odcs/server/pulp.py +++ b/server/odcs/server/pulp.py @@ -170,10 +170,6 @@ class Pulp(object): """ notes = raw_repo["notes"] url = self.server_url.rstrip("/") + "/" + notes["relative_url"] - # OSBS cannot verify https during the container image build, so - # fallback to http for now. - if url.startswith("https://"): - url = "http://" + url[len("https://") :] return { "id": raw_repo["id"], "url": url, diff --git a/server/tests/test_backend.py b/server/tests/test_backend.py index 35ab115..7e9ce6d 100644 --- a/server/tests/test_backend.py +++ b/server/tests/test_backend.py @@ -875,31 +875,31 @@ class TestBackend(ModelsBaseTest): """ [foo-1] name=foo-1 - baseurl=http://localhost/content/1/x86_64/os + baseurl=https://localhost/content/1/x86_64/os enabled=1 gpgcheck=0 [foo-2] name=foo-2 - baseurl=http://localhost/content/2/x86_64/os + baseurl=https://localhost/content/2/x86_64/os enabled=1 gpgcheck=0 [foo-3] name=foo-3 - baseurl=http://localhost/content/3/ppc64/os + baseurl=https://localhost/content/3/ppc64/os enabled=1 gpgcheck=0 [repo4] name=repo4 - baseurl=http://localhost/content/100/s390/os + baseurl=https://localhost/content/100/s390/os enabled=1 gpgcheck=0 [repo5] name=repo5 - baseurl=http://localhost/content/101/x86_64/os + baseurl=https://localhost/content/101/x86_64/os enabled=1 gpgcheck=0 """ @@ -1085,7 +1085,7 @@ class TestBackend(ModelsBaseTest): """ [foo-1] name=foo-1 - baseurl=http://localhost/content/1/x86_64/os + baseurl=https://localhost/content/1/x86_64/os enabled=1 gpgcheck=0 """ @@ -1451,7 +1451,7 @@ class TestBackend(ModelsBaseTest): """ [repo1] name=repo1 - baseurl=http://localhost/content/1/s390/os + baseurl=https://localhost/content/1/s390/os enabled=1 gpgcheck=0 """