diff --git a/cmd/helm/root_test.go b/cmd/helm/root_test.go index 7d606b8a9..f3eef8b6d 100644 --- a/cmd/helm/root_test.go +++ b/cmd/helm/root_test.go @@ -31,7 +31,7 @@ func TestRootCmd(t *testing.T) { tests := []struct { name, args, cachePath, configPath, dataPath string - envars map[string]string + envvars map[string]string }{ { name: "defaults", @@ -40,19 +40,19 @@ func TestRootCmd(t *testing.T) { { name: "with $XDG_CACHE_HOME set", args: "home", - envars: map[string]string{xdg.CacheHomeEnvVar: "/bar"}, + envvars: map[string]string{xdg.CacheHomeEnvVar: "/bar"}, cachePath: "/bar/helm", }, { name: "with $XDG_CONFIG_HOME set", args: "home", - envars: map[string]string{xdg.ConfigHomeEnvVar: "/bar"}, + envvars: map[string]string{xdg.ConfigHomeEnvVar: "/bar"}, configPath: "/bar/helm", }, { name: "with $XDG_DATA_HOME set", args: "home", - envars: map[string]string{xdg.DataHomeEnvVar: "/bar"}, + envvars: map[string]string{xdg.DataHomeEnvVar: "/bar"}, dataPath: "/bar/helm", }, } @@ -61,7 +61,7 @@ func TestRootCmd(t *testing.T) { t.Run(tt.name, func(t *testing.T) { defer ensure.HelmHome(t)() - for k, v := range tt.envars { + for k, v := range tt.envvars { os.Setenv(k, v) } diff --git a/pkg/cli/environment_test.go b/pkg/cli/environment_test.go index d6856dd01..fadc2981e 100644 --- a/pkg/cli/environment_test.go +++ b/pkg/cli/environment_test.go @@ -29,8 +29,8 @@ func TestEnvSettings(t *testing.T) { name string // input - args string - envars map[string]string + args string + envvars map[string]string // expected values ns, kcontext string @@ -47,17 +47,17 @@ func TestEnvSettings(t *testing.T) { debug: true, }, { - name: "with envvars set", - envars: map[string]string{"HELM_DEBUG": "1", "HELM_NAMESPACE": "yourns"}, - ns: "yourns", - debug: true, + name: "with envvars set", + envvars: map[string]string{"HELM_DEBUG": "1", "HELM_NAMESPACE": "yourns"}, + ns: "yourns", + debug: true, }, { - name: "with flags and envvars set", - args: "--debug --namespace=myns", - envars: map[string]string{"HELM_DEBUG": "1", "HELM_NAMESPACE": "yourns"}, - ns: "myns", - debug: true, + name: "with flags and envvars set", + args: "--debug --namespace=myns", + envvars: map[string]string{"HELM_DEBUG": "1", "HELM_NAMESPACE": "yourns"}, + ns: "myns", + debug: true, }, } @@ -65,7 +65,7 @@ func TestEnvSettings(t *testing.T) { t.Run(tt.name, func(t *testing.T) { defer resetEnv()() - for k, v := range tt.envars { + for k, v := range tt.envvars { os.Setenv(k, v) }