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