From df85810fdc4036fc8c322402496353a26bd86bbf Mon Sep 17 00:00:00 2001 From: Matthew Fisher Date: Sat, 17 Nov 2018 14:43:42 +0100 Subject: [PATCH] test from a non-root directory Signed-off-by: Matthew Fisher --- .appveyor.yml | 2 +- pkg/helm/helmpath/helmhome_unix_test.go | 16 ++++++++-------- pkg/helm/helmpath/helmhome_windows_test.go | 16 ++++++++-------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index dfd36699e..5be7628a4 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -6,7 +6,7 @@ environment: install: - ps: iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/fishworks/gofish/master/scripts/install.ps1')) - gofish init - - gofish install dep go + - gofish install dep - go version - dep ensure -vendor-only cache: diff --git a/pkg/helm/helmpath/helmhome_unix_test.go b/pkg/helm/helmpath/helmhome_unix_test.go index ff866bfc0..adf620181 100644 --- a/pkg/helm/helmpath/helmhome_unix_test.go +++ b/pkg/helm/helmpath/helmhome_unix_test.go @@ -22,7 +22,7 @@ import ( ) func TestHelmHome(t *testing.T) { - hh := Home("/r") + hh := Home("/r/users/helmtest") isEq := func(t *testing.T, a, b string) { if a != b { t.Error(runtime.GOOS) @@ -30,13 +30,13 @@ func TestHelmHome(t *testing.T) { } } - isEq(t, hh.String(), "/r") - isEq(t, hh.Repository(), "/r/repository") - isEq(t, hh.RepositoryFile(), "/r/repository/repositories.yaml") - isEq(t, hh.Cache(), "/r/repository/cache") - isEq(t, hh.CacheIndex("t"), "/r/repository/cache/t-index.yaml") - isEq(t, hh.Starters(), "/r/starters") - isEq(t, hh.Archive(), "/r/cache/archive") + isEq(t, hh.String(), "/r/users/helmtest") + isEq(t, hh.Repository(), "/r/users/helmtest/repository") + isEq(t, hh.RepositoryFile(), "/r/users/helmtest/repository/repositories.yaml") + isEq(t, hh.Cache(), "/r/users/helmtest/repository/cache") + isEq(t, hh.CacheIndex("t"), "/r/users/helmtest/repository/cache/t-index.yaml") + isEq(t, hh.Starters(), "/r/users/helmtest/starters") + isEq(t, hh.Archive(), "/r/users/helmtest/cache/archive") } func TestHelmHome_expand(t *testing.T) { diff --git a/pkg/helm/helmpath/helmhome_windows_test.go b/pkg/helm/helmpath/helmhome_windows_test.go index b962c6298..67742841d 100644 --- a/pkg/helm/helmpath/helmhome_windows_test.go +++ b/pkg/helm/helmpath/helmhome_windows_test.go @@ -20,18 +20,18 @@ import ( ) func TestHelmHome(t *testing.T) { - hh := Home("r:\\") + hh := Home("r:\\users\\helmtest") isEq := func(t *testing.T, a, b string) { if a != b { t.Errorf("Expected %q, got %q", b, a) } } - isEq(t, hh.String(), "r:\\") - isEq(t, hh.Repository(), "r:\\repository") - isEq(t, hh.RepositoryFile(), "r:\\repository\\repositories.yaml") - isEq(t, hh.Cache(), "r:\\repository\\cache") - isEq(t, hh.CacheIndex("t"), "r:\\repository\\cache\\t-index.yaml") - isEq(t, hh.Starters(), "r:\\starters") - isEq(t, hh.Archive(), "r:\\cache\\archive") + isEq(t, hh.String(), "r:\\users\\helmtest") + isEq(t, hh.Repository(), "r:\\users\\helmtestrepository") + isEq(t, hh.RepositoryFile(), "r:\\users\\helmtestrepository\\repositories.yaml") + isEq(t, hh.Cache(), "r:\\users\\helmtestrepository\\cache") + isEq(t, hh.CacheIndex("t"), "r:\\users\\helmtestrepository\\cache\\t-index.yaml") + isEq(t, hh.Starters(), "r:\\users\\helmteststarters") + isEq(t, hh.Archive(), "r:\\users\\helmtestcache\\archive") }