summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Changes3
-rw-r--r--t/superuser--mirrorlist.t12
2 files changed, 15 insertions, 0 deletions
diff --git a/Changes b/Changes
index fcb26e7a..3b127df4 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,6 @@
+- cpan_testers:
+ o Skip mirrorlist tests if there's only one broken mirror such as on mga[1-6]
+
Version 8.128 - 5 November 2022
- library:
diff --git a/t/superuser--mirrorlist.t b/t/superuser--mirrorlist.t
index cc3a8be6..b1d9deb3 100644
--- a/t/superuser--mirrorlist.t
+++ b/t/superuser--mirrorlist.t
@@ -16,6 +16,8 @@ BEGIN {
BEGIN { use_ok 'urpm::cfg' }
+need_one_valid_mirror();
+
need_root_and_prepare();
need_downloader();
@@ -32,3 +34,13 @@ if ($ENV{AUTHOR_TESTING}) {
is(`rpm -q --qf '%{name}' --root $::pwd/root $name`, $name, "$name is installed");
}
urpmi_removemedia('-a');
+
+sub need_one_valid_mirror() {
+ require urpm;
+ require urpm::mirrors;
+ my @mirrors = urpm::mirrors::_list(urpm->new, urpm::mirrors::_MIRRORLIST());
+ if ($#mirrors == 0 && $mirrors[0]->{url} =~ m!mageia.fis.unb.br/distrib/!) {
+ warn ">> Only one unusable mirrors\n";
+ exit(0);
+ }
+}