Use a hostname more likely to be non-existent than localhost

Otherwise, it's possible that certain network configuration defining
*.localhost cause the tests to fail.
This commit is contained in:
Lorenzo Bolla
2021-02-02 14:25:54 +01:00
parent 24a027194e
commit f4dc87fa44

View File

@@ -115,7 +115,7 @@ func (s *DownloaderSuite) TestDownload404(c *C) {
}
func (s *DownloaderSuite) TestDownloadConnectError(c *C) {
c.Assert(s.d.Download(s.ctx, "http://nosuch.localhost/", s.tempfile.Name()),
c.Assert(s.d.Download(s.ctx, "http://nosuch.host/", s.tempfile.Name()),
ErrorMatches, ".*no such host")
}
@@ -138,7 +138,7 @@ func (s *DownloaderSuite) TestGetLength404(c *C) {
}
func (s *DownloaderSuite) TestGetLengthConnectError(c *C) {
_, err := s.d.GetLength(s.ctx, "http://nosuch.localhost/")
_, err := s.d.GetLength(s.ctx, "http://nosuch.host/")
c.Assert(err, ErrorMatches, ".*no such host")
}