mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
Test preferred location in Metalink-over-HTTP test case.
* testenv/Test-metalink-http.py: Ensure preferred location is handled properly.
This commit is contained in:
parent
6064f21c66
commit
4c3043d19d
@ -52,8 +52,10 @@ LinkHeaders = [
|
|||||||
"<http://{{SRV_HOST}}:{{SRV_PORT}}/File1>; rel=strange; pri=4",
|
"<http://{{SRV_HOST}}:{{SRV_PORT}}/File1>; rel=strange; pri=4",
|
||||||
# This file should be picked first, because it has the lowest pri among preferred.
|
# This file should be picked first, because it has the lowest pri among preferred.
|
||||||
"<http://{{SRV_HOST}}:{{SRV_PORT}}/File1_try1_corrupted>; rel=duplicate; geo=su; pri=4; pref",
|
"<http://{{SRV_HOST}}:{{SRV_PORT}}/File1_try1_corrupted>; rel=duplicate; geo=su; pri=4; pref",
|
||||||
|
# This file should NOT be picked third due to preferred location set to 'uk'
|
||||||
|
"<http://{{SRV_HOST}}:{{SRV_PORT}}/File1_badgeo>; rel =duplicate;pri=5",
|
||||||
# This file should be picked as third try, and it should succeed
|
# This file should be picked as third try, and it should succeed
|
||||||
"<http://{{SRV_HOST}}:{{SRV_PORT}}/File1_try3_ok>; rel=duplicate; pri=5"
|
"<http://{{SRV_HOST}}:{{SRV_PORT}}/File1_try3_ok>; rel=duplicate; pri=5;geo=uk"
|
||||||
]
|
]
|
||||||
DigestHeader = "SHA-256={{FILE1_HASH}}"
|
DigestHeader = "SHA-256={{FILE1_HASH}}"
|
||||||
|
|
||||||
@ -70,7 +72,7 @@ FileOkLocal = WgetFile ("test.meta", File1)
|
|||||||
SigFile = WgetFile ("Sig.asc", Signature)
|
SigFile = WgetFile ("Sig.asc", Signature)
|
||||||
FileNoMeta = WgetFile ("File2", File2)
|
FileNoMeta = WgetFile ("File2", File2)
|
||||||
|
|
||||||
WGET_OPTIONS = "--metalink-over-http "
|
WGET_OPTIONS = "--metalink-over-http --preferred-location=uk"
|
||||||
WGET_URLS = [["test.meta", "File2"]]
|
WGET_URLS = [["test.meta", "File2"]]
|
||||||
|
|
||||||
Files = [[FileOkServer, FileBadPref, FileBadHash, MetaFile, SigFile, FileNoMeta]]
|
Files = [[FileOkServer, FileBadPref, FileBadHash, MetaFile, SigFile, FileNoMeta]]
|
||||||
|
Loading…
Reference in New Issue
Block a user