Skip to content

Commit 488f94d

Browse files
committed
chore: rename chart and test case with clear intention
1 parent 47d531a commit 488f94d

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

plugin/builtin/helmchartinflationgenerator/HelmChartInflationGenerator_test.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -771,8 +771,8 @@ releaseName: podinfo2
771771
assert.Contains(t, string(podinfo2ChartContents), "version: 6.1.8")
772772
}
773773

774-
// Addressed: https://github.com/kubernetes-sigs/kustomize/issues/5163
775-
func TestHelmChartInflationGeneratorWithLocalChartWithVersion5163(t *testing.T) {
774+
// Reference: https://github.com/kubernetes-sigs/kustomize/issues/5163
775+
func TestHelmChartInflationGeneratorUsingVersionWithoutRepo(t *testing.T) {
776776
th := kusttest_test.MakeEnhancedHarnessWithTmpRoot(t).
777777
PrepBuiltin("HelmChartInflationGenerator")
778778
defer th.Reset()
@@ -786,21 +786,22 @@ func TestHelmChartInflationGeneratorWithLocalChartWithVersion5163(t *testing.T)
786786
apiVersion: builtin
787787
kind: HelmChartInflationGenerator
788788
metadata:
789-
name: issue5163
790-
name: issue5163
789+
name: foo-chart
790+
name: foo-chart
791791
version: 1.0.0
792-
releaseName: issue5163
792+
releaseName: foo-chart
793793
chartHome: ./charts
794794
`)
795795

796796
cm, err := rm.Resources()[0].GetFieldValue("metadata.name")
797797
assert.NoError(t, err)
798798
assert.Equal(t, "bar", cm)
799799

800-
chartDir := filepath.Join(th.GetRoot(), "charts/issue5163")
800+
chartDir := filepath.Join(th.GetRoot(), "charts/foo-chart")
801801
assert.True(t, th.GetFSys().Exists(chartDir))
802802

803803
chartYamlContent, err := th.GetFSys().ReadFile(filepath.Join(chartDir, "Chart.yaml"))
804804
assert.NoError(t, err)
805+
assert.Contains(t, string(chartYamlContent), "name: foo-chart")
805806
assert.Contains(t, string(chartYamlContent), "version: 1.0.0")
806807
}

plugin/builtin/helmchartinflationgenerator/testdata/charts/issue5163/Chart.yaml renamed to plugin/builtin/helmchartinflationgenerator/testdata/charts/foo-chart/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: v2
2-
name: issue5163
2+
name: foo-chart
33
description: A Helm chart for Kubernetes
44

55
# A chart can be either an 'application' or a 'library' chart.

0 commit comments

Comments
 (0)