From d553bb69150ef4ae1ee603e7d54d3b8ed8ffbaa0 Mon Sep 17 00:00:00 2001 From: Jiri Kyjovsky Date: Thu, 13 Mar 2025 22:33:01 +0100 Subject: [PATCH 1/2] cli: add workaround for redirect download with accept list --- cli/copr_cli/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cli/copr_cli/main.py b/cli/copr_cli/main.py index 2d9a2c328..d64ad1cf2 100644 --- a/cli/copr_cli/main.py +++ b/cli/copr_cli/main.py @@ -668,7 +668,10 @@ def action_download_build(self, args): "-A", "review.json", "-A", "rpmlint.txt", ]) - cmd.append(chroot.result_url + "fedora-review") + # fedora-review url redirects to the fedora-review/ and wget2 with -A option + # doesn't follow redirects in this case + # upstream issue: TODO + cmd.append(chroot.result_url + "fedora-review/") cmd.append(chroot.result_url) subprocess.call(cmd) From a1519c2c0a9c500a8126745bad85241cdf4ea114 Mon Sep 17 00:00:00 2001 From: Jiri Kyjovsky Date: Thu, 13 Mar 2025 23:08:50 +0100 Subject: [PATCH 2/2] beaker: allow HTTP version 2 for http checking code status --- .../copr-cli-basic-operations/runtest-custom-method.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/beaker-tests/Sanity/copr-cli-basic-operations/runtest-custom-method.sh b/beaker-tests/Sanity/copr-cli-basic-operations/runtest-custom-method.sh index 2fc83bb3e..ca97626d5 100755 --- a/beaker-tests/Sanity/copr-cli-basic-operations/runtest-custom-method.sh +++ b/beaker-tests/Sanity/copr-cli-basic-operations/runtest-custom-method.sh @@ -41,10 +41,10 @@ check_resultdir () check_http_status () { - grep "HTTP/1.1 $1" "$rlRun_LOG" || { - echo "failed" - grep "HTTP/1.1 " "$rlRun_LOG" - false + grep -E "HTTP/(1.1|2) $1" "$rlRun_LOG" || { + echo "failed" + grep -E "HTTP/(1.1|2) " "$rlRun_LOG" + false } }