From adedcb5b8171544fe5f7a3933ce3a76c5ee4116b Mon Sep 17 00:00:00 2001
From: Hubert Tarasiuk
Date: Fri, 3 Jul 2015 00:27:24 +0200
Subject: [PATCH 12/12] Test preferred location in Metalink-over-HTTP test
case.
* testenv/Test-metalink-http.py: Ensure preferred location is handled
properly.
---
testenv/Test-metalink-http.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/testenv/Test-metalink-http.py b/testenv/Test-metalink-http.py
index d50a370..cafb5be 100755
--- a/testenv/Test-metalink-http.py
+++ b/testenv/Test-metalink-http.py
@@ -52,8 +52,10 @@ LinkHeaders = [
"; rel=strange; pri=4",
# This file should be picked first, because it has the lowest pri among preferred.
"; rel=duplicate; geo=su; pri=4; pref",
+ # This file should NOT be picked third due to preferred location set to 'uk'
+ "; rel =duplicate;pri=5",
# This file should be picked as third try, and it should succeed
- "; rel=duplicate; pri=5"
+ "; rel=duplicate; pri=5;geo=uk"
]
DigestHeader = "SHA-256={{FILE1_HASH}}"
@@ -70,7 +72,7 @@ FileOkLocal = WgetFile ("test.meta", File1)
SigFile = WgetFile ("Sig.asc", Signature)
FileNoMeta = WgetFile ("File2", File2)
-WGET_OPTIONS = "--metalink-over-http "
+WGET_OPTIONS = "--metalink-over-http --preferred-location=uk"
WGET_URLS = [["test.meta", "File2"]]
Files = [[FileOkServer, FileBadPref, FileBadHash, MetaFile, SigFile, FileNoMeta]]
--
2.4.3