Fix integration test

This commit is contained in:
cbrgm 2018-08-08 21:49:22 +02:00
parent b7ceb78f28
commit 28c712dc98

View File

@ -6,13 +6,13 @@ import (
func TestDownloadURL(t *testing.T) { func TestDownloadURL(t *testing.T) {
want := "https://github.com/gohugoio/hugo/releases/download/v1.0/hugo_1.0_Linux-64bit.tar.gz" want := "https://github.com/gohugoio/hugo/releases/download/v1.0/hugo_1.0_Linux-64bit.tar.gz"
if got := downloadURL("1.0", "64bit"); got != want { if got := downloadURL("1.0"); got != want {
t.Errorf("Download url is not correct, got: %s, want: %s", got, want) t.Errorf("Download url is not correct, got: %s, want: %s", got, want)
} }
} }
func TestGet(t *testing.T) { func TestGet(t *testing.T) {
if binPath , err := Get("0.42","64bit"); err != nil { if binPath , err := Get("0.42"); err != nil {
t.Errorf("Failed to download archive: %s", err) t.Errorf("Failed to download archive: %s", err)
if binPath == "" { if binPath == "" {
t.Errorf("binPath was nil") t.Errorf("binPath was nil")