Skip to content

Commit 4e9df75

Browse files
committed
fix lint issues
1 parent 2c08792 commit 4e9df75

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

plugin/builtin/helmchartinflationgenerator/HelmChartInflationGenerator_test.go

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ func runHelmVersionTests(t *testing.T, testBody func(t *testing.T, th *kusttest_
4646

4747
func TestHelmChartInflationGenerator(t *testing.T) {
4848
runHelmVersionTests(t, func(t *testing.T, th *kusttest_test.HarnessEnhanced) {
49+
t.Helper()
4950
rm := th.LoadAndRunGenerator(`
5051
apiVersion: builtin
5152
kind: HelmChartInflationGenerator
@@ -386,6 +387,7 @@ spec:
386387

387388
func TestHelmChartInflationGeneratorWithValuesInlineOverride(t *testing.T) {
388389
runHelmVersionTests(t, func(t *testing.T, th *kusttest_test.HarnessEnhanced) {
390+
t.Helper()
389391
rm := th.LoadAndRunGenerator(`
390392
apiVersion: builtin
391393
kind: HelmChartInflationGenerator
@@ -413,6 +415,7 @@ valuesInline:
413415

414416
func TestHelmChartInflationGeneratorWithLocalValuesFile(t *testing.T) {
415417
runHelmVersionTests(t, func(t *testing.T, th *kusttest_test.HarnessEnhanced) {
418+
t.Helper()
416419
th.WriteF(filepath.Join(th.GetRoot(), "myValues.yaml"), `
417420
minecraftServer:
418421
eula: true
@@ -446,6 +449,7 @@ valuesFile: myValues.yaml
446449

447450
func TestHelmChartInflationGeneratorWithInLineReplace(t *testing.T) {
448451
runHelmVersionTests(t, func(t *testing.T, th *kusttest_test.HarnessEnhanced) {
452+
t.Helper()
449453
rm := th.LoadAndRunGenerator(`
450454
apiVersion: builtin
451455
kind: HelmChartInflationGenerator
@@ -478,7 +482,7 @@ valuesMerge: replace
478482

479483
func TestHelmChartInflationGeneratorWithIncludeCRDs(t *testing.T) {
480484
runHelmVersionTests(t, func(t *testing.T, th *kusttest_test.HarnessEnhanced) {
481-
485+
t.Helper()
482486
// we store this data outside of the _test.go file as its sort of huge
483487
// and has backticks, which makes string literals wonky
484488
testData, err := os.ReadFile("include_crds_testdata.txt")
@@ -508,7 +512,7 @@ valuesInline:
508512

509513
func TestHelmChartInflationGeneratorWithExcludeCRDs(t *testing.T) {
510514
runHelmVersionTests(t, func(t *testing.T, th *kusttest_test.HarnessEnhanced) {
511-
515+
t.Helper()
512516
// we choose this helm chart as it has the ability to turn
513517
// everything off, except CRDs.
514518
rm := th.LoadAndRunGenerator(`
@@ -533,7 +537,7 @@ valuesInline:
533537

534538
func TestHelmChartInflationGeneratorWithSkipHooks(t *testing.T) {
535539
runHelmVersionTests(t, func(t *testing.T, th *kusttest_test.HarnessEnhanced) {
536-
540+
t.Helper()
537541
// we choose this helm chart as it has the ability to turn
538542
// everything off, except CRDs.
539543
rm := th.LoadAndRunGenerator(`
@@ -557,7 +561,7 @@ valuesInline:
557561

558562
func TestHelmChartInflationGeneratorWithIncludeCRDsNotSpecified(t *testing.T) {
559563
runHelmVersionTests(t, func(t *testing.T, th *kusttest_test.HarnessEnhanced) {
560-
564+
t.Helper()
561565
rm := th.LoadAndRunGenerator(`
562566
apiVersion: builtin
563567
kind: HelmChartInflationGenerator
@@ -579,7 +583,7 @@ valuesInline:
579583

580584
func TestHelmChartInflationGeneratorIssue4905(t *testing.T) {
581585
runHelmVersionTests(t, func(t *testing.T, th *kusttest_test.HarnessEnhanced) {
582-
586+
t.Helper()
583587
copyTestChartsIntoHarness(t, th)
584588

585589
rm := th.LoadAndRunGenerator(`
@@ -611,7 +615,7 @@ metadata:
611615

612616
func TestHelmChartInflationGeneratorValuesOverride(t *testing.T) {
613617
runHelmVersionTests(t, func(t *testing.T, th *kusttest_test.HarnessEnhanced) {
614-
618+
t.Helper()
615619
copyTestChartsIntoHarness(t, th)
616620

617621
rm := th.LoadAndRunGenerator(`
@@ -653,7 +657,7 @@ obj:
653657

654658
func TestHelmChartInflationGeneratorValuesReplace(t *testing.T) {
655659
runHelmVersionTests(t, func(t *testing.T, th *kusttest_test.HarnessEnhanced) {
656-
660+
t.Helper()
657661
copyTestChartsIntoHarness(t, th)
658662

659663
th.WriteF(filepath.Join(th.GetRoot(), "replacedValues.yaml"), `
@@ -710,7 +714,7 @@ obj:
710714

711715
func TestHelmChartInflationGeneratorValuesMerge(t *testing.T) {
712716
runHelmVersionTests(t, func(t *testing.T, th *kusttest_test.HarnessEnhanced) {
713-
717+
t.Helper()
714718
copyTestChartsIntoHarness(t, th)
715719

716720
rm := th.LoadAndRunGenerator(`
@@ -762,7 +766,7 @@ func copyTestChartsIntoHarness(t *testing.T, th *kusttest_test.HarnessEnhanced)
762766

763767
func TestHelmChartInflationGeneratorWithSameChartMultipleVersions(t *testing.T) {
764768
runHelmVersionTests(t, func(t *testing.T, th *kusttest_test.HarnessEnhanced) {
765-
769+
t.Helper()
766770
tests := []struct {
767771
name string
768772
chartName string
@@ -849,7 +853,7 @@ releaseName: %s
849853
// https://github.com/kubernetes-sigs/kustomize/issues/4813
850854
func TestHelmChartInflationGeneratorWithMultipleInstancesSameChartDifferentVersions(t *testing.T) {
851855
runHelmVersionTests(t, func(t *testing.T, th *kusttest_test.HarnessEnhanced) {
852-
856+
t.Helper()
853857
podinfo1 := th.LoadAndRunGenerator(`
854858
apiVersion: builtin
855859
kind: HelmChartInflationGenerator
@@ -899,7 +903,7 @@ releaseName: podinfo2
899903
// Reference: https://github.com/kubernetes-sigs/kustomize/issues/5163
900904
func TestHelmChartInflationGeneratorUsingVersionWithoutRepo(t *testing.T) {
901905
runHelmVersionTests(t, func(t *testing.T, th *kusttest_test.HarnessEnhanced) {
902-
906+
t.Helper()
903907
copyTestChartsIntoHarness(t, th)
904908

905909
rm := th.LoadAndRunGenerator(`
@@ -929,6 +933,7 @@ chartHome: ./charts
929933

930934
func TestHelmChartInflationGeneratorWithDebug(t *testing.T) {
931935
runHelmVersionTests(t, func(t *testing.T, th *kusttest_test.HarnessEnhanced) {
936+
t.Helper()
932937
copyTestChartsIntoHarness(t, th)
933938

934939
rm := th.LoadAndRunGenerator(`
@@ -959,6 +964,7 @@ debug: true
959964

960965
func TestHelmChartInflationGeneratorWithDevel(t *testing.T) {
961966
runHelmVersionTests(t, func(t *testing.T, th *kusttest_test.HarnessEnhanced) {
967+
t.Helper()
962968
copyTestChartsIntoHarness(t, th)
963969

964970
rm := th.LoadAndRunGenerator(`

0 commit comments

Comments
 (0)