mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-10-22 11:08:20 +00:00
Refactor to separate FakeDownloader, DownloadWithCompression, repo download.
This commit is contained in:
1 parent
b4e6c281c2
commit
29ddc4fc00
5 files changed
+195
-65
No files matched your search
@@ -79,7 +79,7 @@ func (s *DownloaderSuite) TestDownloadTemp(c *C) {
|
||||
d := NewDownloader(2)
|
||||
defer d.Shutdown()
|
||||
|
||||
f, err := d.DownloadTemp("http://smira.ru/")
|
||||
f, err := DownloadTemp(d, "http://smira.ru/")
|
||||
c.Assert(err, IsNil)
|
||||
defer f.Close()
|
||||
|
||||
@@ -96,7 +96,7 @@ func (s *DownloaderSuite) TestDownloadTempError(c *C) {
|
||||
d := NewDownloader(2)
|
||||
defer d.Shutdown()
|
||||
|
||||
f, err := d.DownloadTemp("http://smira.ru/doesntexist")
|
||||
f, err := DownloadTemp(d, "http://smira.ru/doesntexist")
|
||||
c.Assert(err, NotNil)
|
||||
c.Assert(f, IsNil)
|
||||
c.Assert(err, ErrorMatches, "HTTP code 404.*")
|
||||
|
||||
Reference in new issue
Block a user