From c48a3435f526ccfd064d44a0e73dbdc5f4516f4f Mon Sep 17 00:00:00 2001 From: Zach Burgess Date: Wed, 2 Jul 2025 09:30:59 -0700 Subject: [PATCH] Remove unnecessary calls for changing directory to `helmpath.CachePath`. This was only set on some tests in create_test.go and isn't affecting the test. Signed-off-by: Zach Burgess --- pkg/cmd/create_test.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkg/cmd/create_test.go b/pkg/cmd/create_test.go index 2a4ca95ca..90ed90eff 100644 --- a/pkg/cmd/create_test.go +++ b/pkg/cmd/create_test.go @@ -60,10 +60,10 @@ func TestCreateCmd(t *testing.T) { } func TestCreateStarterCmd(t *testing.T) { + t.Chdir(t.TempDir()) ensure.HelmHome(t) cname := "testchart" defer resetEnv()() - t.Chdir(t.TempDir()) // Create a starter. starterchart := helmpath.DataPath("starters") os.MkdirAll(starterchart, 0o755) @@ -140,9 +140,6 @@ func TestCreateStarterAbsoluteCmd(t *testing.T) { t.Fatalf("Could not write template: %s", err) } - os.MkdirAll(helmpath.CachePath(), 0o755) - defer t.Chdir(helmpath.CachePath()) - starterChartPath := filepath.Join(starterchart, "starterchart") // Run a create