Fix unit tests on Win10

Untested attempt to fix unit tests that fail on Windows 10 build 1909.
From the test output mentioned in #1332, it looks like this version of Windows
doesn't report an "invalid port" error when asked to connect to an invalid port,
instead it treats the port as part of the host name and attempts a DNS lookup.
Naturally, this fails because the colon character is not valid in a host name.
This change simply makes this inexplicable error an expected result since the
outcome is the same and we can't fix Windows.
This commit is contained in:
William Elwood 2020-06-09 15:51:23 +01:00
parent f9268be0c2
commit 5a1fdc8cd6
1 changed files with 1 additions and 1 deletions

View File

@ -309,7 +309,7 @@ func prepSourceTestDownload(t *testing.T, d *SourceTestData, e *SourceTestExpect
e.err = "unexpected EOF"
case TestStateOpenErr, TestStateOpenSigErr:
path = "00000" + path // high numeric port is parsed but then fails to connect
e.err = "invalid port"
e.err = "invalid port|no such host"
case TestStatePathErr:
path = "..." + path // non-numeric port fails URL parsing
}