From 9cb382095c96a9b1d36b6b9568246c0ca0f59962 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Mon, 17 Mar 2025 11:07:29 -0700 Subject: [PATCH] Get data/scripts via autoinst_url, not Pagure Various tests use scripts or data that are stored within this distri itself. To improve reliability and lessen the load on Pagure, let's move them all to data/ and retrieve them from the test runner using autoinst_url instead of going out to Pagure. Signed-off-by: Adam Williamson --- check-release.py => data/check-release.py | 0 ostree-parse-pungi.py => data/ostree-parse-pungi.py | 0 tests/_installer_build.pm | 2 +- tests/_ostree_build.pm | 4 ++-- tests/os_release.pm | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) rename check-release.py => data/check-release.py (100%) rename ostree-parse-pungi.py => data/ostree-parse-pungi.py (100%) mode change 100644 => 100755 diff --git a/check-release.py b/data/check-release.py similarity index 100% rename from check-release.py rename to data/check-release.py diff --git a/ostree-parse-pungi.py b/data/ostree-parse-pungi.py old mode 100644 new mode 100755 similarity index 100% rename from ostree-parse-pungi.py rename to data/ostree-parse-pungi.py diff --git a/tests/_installer_build.pm b/tests/_installer_build.pm index 906adfaa..1d641551 100644 --- a/tests/_installer_build.pm +++ b/tests/_installer_build.pm @@ -44,7 +44,7 @@ sub run { # do a package version check on the packages installed to the # installer environment - see # https://pagure.io/releng/failed-composes/issue/6538#comment-917347 - assert_script_run 'curl --retry-delay 10 --max-time 30 --retry 5 -o updvercheck.py https://pagure.io/fedora-qa/os-autoinst-distri-fedora/raw/lorax-check-packages/f/updvercheck.py', timeout => 180; + assert_script_run 'curl --retry-delay 10 --max-time 30 --retry 5 -o updvercheck.py ' . autoinst_url . '/data/updvercheck.py', timeout => 180; my $advisory = get_var("ADVISORY"); my $cmd = 'python3 ./updvercheck.py /mnt/updatepkgs.txt pylorax.log'; $cmd .= " $advisory" if ($advisory); diff --git a/tests/_ostree_build.pm b/tests/_ostree_build.pm index 82e19ca4..b2fe1952 100644 --- a/tests/_ostree_build.pm +++ b/tests/_ostree_build.pm @@ -86,7 +86,7 @@ sub run { assert_script_run 'git clone https://pagure.io/pungi-fedora.git'; assert_script_run 'cd pungi-fedora/'; assert_script_run "git checkout ${branch}"; - assert_script_run 'curl --retry-delay 10 --max-time 30 --retry 5 -o ostree-parse-pungi.py https://pagure.io/fedora-qa/os-autoinst-distri-fedora/raw/main/f/ostree-parse-pungi.py', timeout => 180; + assert_script_run 'curl --retry-delay 10 --max-time 30 --retry 5 -o ostree-parse-pungi.py ' . autoinst_url . '/data/ostree-parse-pungi.py', timeout => 180; my $loraxargs = script_output "python3 ostree-parse-pungi.py $lcsubv $arch"; # this 'temporary file cleanup' thing can actually wipe bits of @@ -111,7 +111,7 @@ sub run { # do a package version check on the packages installed to the # installer environment - see # https://pagure.io/releng/failed-composes/issue/6538#comment-917347 - assert_script_run 'curl --retry-delay 10 --max-time 30 --retry 5 -o updvercheck.py https://pagure.io/fedora-qa/os-autoinst-distri-fedora/raw/lorax-check-packages/f/updvercheck.py', timeout => 180; + assert_script_run 'curl --retry-delay 10 --max-time 30 --retry 5 -o updvercheck.py ' . autoinst_url . '/data/updvercheck.py', timeout => 180; my $advisory = get_var("ADVISORY"); my $cmd = 'python3 ./updvercheck.py /mnt/updatepkgs.txt pylorax.log'; $cmd .= " $advisory" if ($advisory); diff --git a/tests/os_release.pm b/tests/os_release.pm index 7a3ad99a..ce483658 100644 --- a/tests/os_release.pm +++ b/tests/os_release.pm @@ -14,7 +14,7 @@ sub strip_marks { sub download_python_tests { # Download the Python test script and change mode to rwx,rx,rx. - assert_script_run("curl https://pagure.io/fedora-qa/os-autoinst-distri-fedora/raw/os-release-addon/f/check-release.py -o ~/check-release.py --retry 10 --retry-delay 2", timeout => 60); + assert_script_run("curl " . autoinst_url . "/data/check-release.py -o ~/check-release.py --retry 10 --retry-delay 2", timeout => 60); assert_script_run("chmod 755 ~/check-release.py", timeout => 20); sleep(5); }