summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--postgresql-tests/config.sh5
-rw-r--r--postgresql-tests/lib_pgsql.sh13
-rw-r--r--postgresql-tests/tasks/upgrade-basic/runtest.sh2
-rw-r--r--postgresql-tests/tasks/upgrade-utf8-syntax/runtest.sh2
4 files changed, 19 insertions, 3 deletions
diff --git a/postgresql-tests/config.sh b/postgresql-tests/config.sh
index c5bd47a..6650ed2 100644
--- a/postgresql-tests/config.sh
+++ b/postgresql-tests/config.sh
@@ -1,8 +1,11 @@
# include PostgreSQL specific test-library
. "$srcdir/lib_pgsql.sh" || exit 1
+export dtf_dataurls
+
# this is needed for some tests
-export dtf_dataurl=http://pensioner.lab.eng.brq.redhat.com/root-tests/data/postgresql/
+dtf_dataurls[0]=http://172.16.125.10/root-tests/data/postgresql/
+dtf_dataurls[1]=http://pensioner.lab.eng.brq.redhat.com/root-tests/data/postgresql/
dtf_cb_dist_tasks()
{
diff --git a/postgresql-tests/lib_pgsql.sh b/postgresql-tests/lib_pgsql.sh
index 13bfc82..99cde85 100644
--- a/postgresql-tests/lib_pgsql.sh
+++ b/postgresql-tests/lib_pgsql.sh
@@ -155,3 +155,16 @@ dtf_postgresql_upgrade_tour()
return $rv
}
+
+dtf_postgresql_data_mirror()
+{
+ if test -z "$___mirror_chosen"; then
+ for i in "${dtf_dataurls[@]}"; do
+ echo >&2 "trying $i"
+ timeout 3 curl "$i" >/dev/null && ___mirror_chosen="$i" && break
+ done
+ test -z "$___mirror_chosen" && return 1
+ fi
+
+ echo "$___mirror_chosen"
+}
diff --git a/postgresql-tests/tasks/upgrade-basic/runtest.sh b/postgresql-tests/tasks/upgrade-basic/runtest.sh
index 5dd85bb..37af60e 100644
--- a/postgresql-tests/tasks/upgrade-basic/runtest.sh
+++ b/postgresql-tests/tasks/upgrade-basic/runtest.sh
@@ -1,6 +1,6 @@
dtf_postgresql_test_init
-dtf_postgresql_upgrade_tour "$dtf_dataurl" basic.tar.gz
+dtf_postgresql_upgrade_tour "$(dtf_postgresql_data_mirror)" basic.tar.gz
rlAssert0 "test wrapper should finish successfully" $?
dtf_postgresql_test_finish
diff --git a/postgresql-tests/tasks/upgrade-utf8-syntax/runtest.sh b/postgresql-tests/tasks/upgrade-utf8-syntax/runtest.sh
index 9e7d9cf..cc8f8c4 100644
--- a/postgresql-tests/tasks/upgrade-utf8-syntax/runtest.sh
+++ b/postgresql-tests/tasks/upgrade-utf8-syntax/runtest.sh
@@ -9,7 +9,7 @@ dtf_postgresql_cb_upgrade_select()
fi
}
-dtf_postgresql_upgrade_tour "$dtf_dataurl" locale-utf-typo.tar.gz
+dtf_postgresql_upgrade_tour "$(dtf_postgresql_data_mirror)" locale-utf-typo.tar.gz
rlAssert0 "test wrapper should finish successfully" $?
dtf_postgresql_test_finish