Skip to content

Commit

Permalink
frontend: use the same repofile for all CentOS Stream versions
Browse files Browse the repository at this point in the history
Signed-off-by: Nikola Forró <[email protected]>
  • Loading branch information
nforro authored and praiskup committed Jul 26, 2024
1 parent 367deef commit b9b5cf8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions frontend/coprs_frontend/coprs/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,9 @@ def generate_repo_url(mock_chroot, url, arch=None):
if mock_chroot.os_release == "fedora":
os_version = "$releasever"

if mock_chroot.os_release == "centos-stream":
os_version = "$releasever"

if mock_chroot.os_release == "opensuse-leap":
os_version = "$releasever"

Expand Down
10 changes: 10 additions & 0 deletions frontend/coprs_frontend/tests/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,16 @@ def test_generate_repo_url(self):
dict(args=(m3, https_url, 'ppc64le'),
expected="https://example.com/path/rhel7-7.1-ppc64le/")])

m4 = deepcopy(mock_chroot)
m4.os_release = "centos-stream"
m4.os_version = "9"

test_sets.extend([
dict(args=(m4, http_url),
expected="http://example.com/path/centos-stream-$releasever-$basearch/"),
dict(args=(m4, https_url),
expected="https://example.com/path/centos-stream-$releasever-$basearch/")])

app.config["USE_HTTPS_FOR_RESULTS"] = True
for test_set in test_sets:
result = generate_repo_url(*test_set["args"])
Expand Down

0 comments on commit b9b5cf8

Please sign in to comment.