mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-10 09:45:08 +00:00
.github: add Ubuntu VM test
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
This commit is contained in:

committed by
David Crawshaw

parent
73280595a8
commit
9b7fc2ed1f
@@ -246,13 +246,14 @@ func fetchDistro(t *testing.T, resultDistro Distro) string {
|
||||
t.Fatalf("%s replied %s", resultDistro.URL, resp.Status)
|
||||
}
|
||||
|
||||
if _, err = io.Copy(fout, resp.Body); err != nil {
|
||||
if n, err := io.Copy(fout, resp.Body); err != nil {
|
||||
t.Fatalf("download of %s failed: %v", resultDistro.URL, err)
|
||||
} else if n == 0 {
|
||||
t.Fatalf("download of %s got zero-length file", resultDistro.URL)
|
||||
}
|
||||
|
||||
resp.Body.Close()
|
||||
err = fout.Close()
|
||||
if err != nil {
|
||||
if err = fout.Close(); err != nil {
|
||||
t.Fatalf("can't close fout: %v", err)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user