diff --git a/charts/gha-runner-scale-set-controller/tests/template_test.go b/charts/gha-runner-scale-set-controller/tests/template_test.go index 269ddc03..aa8bd7b4 100644 --- a/charts/gha-runner-scale-set-controller/tests/template_test.go +++ b/charts/gha-runner-scale-set-controller/tests/template_test.go @@ -1227,13 +1227,14 @@ func TestNamespaceOverride(t *testing.T) { } for name, tc := range tt { + _tc := tc t.Run(name, func(t *testing.T) { t.Parallel() - templateFile := filepath.Join("templates", tc.file) + templateFile := filepath.Join("templates", _tc.file) - output, err := helm.RenderTemplateE(t, tc.options, chartPath, releaseName, []string{templateFile}) + output, err := helm.RenderTemplateE(t, _tc.options, chartPath, releaseName, []string{templateFile}) if err != nil { - t.Errorf("Error rendering template %s from chart %s: %s", tc.file, chartPath, err) + t.Errorf("Error rendering template %s from chart %s: %s", _tc.file, chartPath, err) } type object struct { diff --git a/charts/gha-runner-scale-set/tests/template_test.go b/charts/gha-runner-scale-set/tests/template_test.go index e158ee78..a8cad113 100644 --- a/charts/gha-runner-scale-set/tests/template_test.go +++ b/charts/gha-runner-scale-set/tests/template_test.go @@ -2449,13 +2449,14 @@ func TestNamespaceOverride(t *testing.T) { } for name, tc := range tt { + _tc := tc t.Run(name, func(t *testing.T) { t.Parallel() - templateFile := filepath.Join("templates", tc.file) + templateFile := filepath.Join("./templates", _tc.file) - output, err := helm.RenderTemplateE(t, tc.options, chartPath, releaseName, []string{templateFile}) + output, err := helm.RenderTemplateE(t, _tc.options, chartPath, releaseName, []string{templateFile}) if err != nil { - t.Errorf("Error rendering template %s from chart %s: %s", tc.file, chartPath, err) + t.Errorf("Error rendering template %s from chart %s: %s", _tc.file, chartPath, err) } type object struct {