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.
16 func TestDownloadGoVersion(t *testing.T) {
18 t.Skipf("Skipping download in short mode")
21 tmpd, err := ioutil.TempDir("", "go")
25 defer os.RemoveAll(tmpd)
27 if err := downloadGoVersion("go1.8.1", "linux", "amd64", filepath.Join(tmpd, "go")); err != nil {
31 // Ensure the VERSION file exists.
32 vf := filepath.Join(tmpd, "go", "VERSION")
33 if _, err := os.Stat(vf); os.IsNotExist(err) {
34 t.Fatalf("file %s does not exist and should", vf)