Skip to content

Commit

Permalink
fix travis build
Browse files Browse the repository at this point in the history
  • Loading branch information
DamnWidget committed Nov 6, 2014
1 parent a0ed87a commit bfceb78
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions cache/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"path/filepath"
"regexp"
"runtime"
"runtime/debug"
"strings"
"time"

Expand Down Expand Up @@ -146,6 +147,7 @@ var _ = Describe("Cache", func() {
_, err := os.Stat(filepath.Join(cache.CacheDirectory(), "1.2.2"))
Expect(err).NotTo(HaveOccurred())
os.RemoveAll(filepath.Join(cache.CacheDirectory(), "1.2.2"))
debug.FreeOSMemory()
})
})

Expand All @@ -156,6 +158,7 @@ var _ = Describe("Cache", func() {
_, err := os.Stat(filepath.Join(cache.CacheDirectory(), "1.1.1"))
Expect(err).NotTo(HaveOccurred())
os.RemoveAll(filepath.Join(cache.CacheDirectory(), "1.1.1"))
debug.FreeOSMemory()
})
})
})
Expand All @@ -172,6 +175,7 @@ var _ = Describe("Cache", func() {
Expect(err).NotTo(HaveOccurred())
os.RemoveAll(
filepath.Join(cache.CacheDirectory(), binary))
debug.FreeOSMemory()
})
})

Expand All @@ -185,6 +189,7 @@ var _ = Describe("Cache", func() {
Expect(err).NotTo(HaveOccurred())
os.RemoveAll(
filepath.Join(cache.CacheDirectory(), binary))
debug.FreeOSMemory()
})
})
})
Expand Down
2 changes: 1 addition & 1 deletion cache/path_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ func CacheDirectory() string {
}

// return back the binary string version for downloads in GNU/Linux
func getBinaryVersion(version string) string {
func GetBinaryVersion(version string) string {
return fmt.Sprintf("%s.linux-%s", version, runtime.GOARCH)
}
2 changes: 1 addition & 1 deletion cache/path_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ func CacheDirectory() string {
}

// return back the binary string version for downloads in Microsoft Windows
func getBinaryVersion(version string) string {
func GetBinaryVersion(version string) string {
return fmt.Sprintf("%s.windows-%s", version, runtime.GOARCH)
}

0 comments on commit bfceb78

Please sign in to comment.