diff options
Diffstat (limited to 'postgresql-tests/lib_pgsql.sh')
-rw-r--r-- | postgresql-tests/lib_pgsql.sh | 13 |
1 files changed, 13 insertions, 0 deletions
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" +} |