| // Copyright 2017 The Go Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| func TestDownloadGoVersion(t *testing.T) { |
| t.Skipf("Skipping download in short mode") |
| tmpd, err := os.MkdirTemp("", "go") |
| if err := downloadGoVersion("go1.8.1", "linux", "amd64", filepath.Join(tmpd, "go")); err != nil { |
| // Ensure the VERSION file exists. |
| vf := filepath.Join(tmpd, "go", "VERSION") |
| if _, err := os.Stat(vf); os.IsNotExist(err) { |
| t.Fatalf("file %s does not exist and should", vf) |