From 4c3043d19d36539689c0b7c67464413cf8b36583 Mon Sep 17 00:00:00 2001 From: Hubert Tarasiuk Date: Fri, 3 Jul 2015 00:27:24 +0200 Subject: [PATCH] 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 d50a3704..cafb5bef 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]]