@@ -771,8 +771,8 @@ releaseName: podinfo2
771
771
assert .Contains (t , string (podinfo2ChartContents ), "version: 6.1.8" )
772
772
}
773
773
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 ) {
776
776
th := kusttest_test .MakeEnhancedHarnessWithTmpRoot (t ).
777
777
PrepBuiltin ("HelmChartInflationGenerator" )
778
778
defer th .Reset ()
@@ -786,21 +786,22 @@ func TestHelmChartInflationGeneratorWithLocalChartWithVersion5163(t *testing.T)
786
786
apiVersion: builtin
787
787
kind: HelmChartInflationGenerator
788
788
metadata:
789
- name: issue5163
790
- name: issue5163
789
+ name: foo-chart
790
+ name: foo-chart
791
791
version: 1.0.0
792
- releaseName: issue5163
792
+ releaseName: foo-chart
793
793
chartHome: ./charts
794
794
` )
795
795
796
796
cm , err := rm .Resources ()[0 ].GetFieldValue ("metadata.name" )
797
797
assert .NoError (t , err )
798
798
assert .Equal (t , "bar" , cm )
799
799
800
- chartDir := filepath .Join (th .GetRoot (), "charts/issue5163 " )
800
+ chartDir := filepath .Join (th .GetRoot (), "charts/foo-chart " )
801
801
assert .True (t , th .GetFSys ().Exists (chartDir ))
802
802
803
803
chartYamlContent , err := th .GetFSys ().ReadFile (filepath .Join (chartDir , "Chart.yaml" ))
804
804
assert .NoError (t , err )
805
+ assert .Contains (t , string (chartYamlContent ), "name: foo-chart" )
805
806
assert .Contains (t , string (chartYamlContent ), "version: 1.0.0" )
806
807
}
0 commit comments