fix: correct expected number of template files in unit-test

Signed-off-by: Henrik Gerdes <hegerdes@outlook.de>
pull/12912/head
Henrik Gerdes 1 year ago
parent 3fc5d689e6
commit d22939b439
No known key found for this signature in database

@ -54,8 +54,8 @@ const (
IgnorefileName = ".helmignore"
// IngressFileName is the name of the example ingress file.
IngressFileName = TemplatesDir + sep + "ingress.yaml"
// HttpRouteFileName is the name of the example HTTPRoute file.
HttpRouteFileName = TemplatesDir + sep + "httproute.yaml"
// HTTPRouteFileName is the name of the example HTTPRoute file.
HTTPRouteFileName = TemplatesDir + sep + "httproute.yaml"
// DeploymentName is the name of the example deployment file.
DeploymentName = TemplatesDir + sep + "deployment.yaml"
// ServiceName is the name of the example service file.
@ -335,7 +335,7 @@ spec:
{{- end }}
`
const defaultHttpRoute = `{{- if .Values.httpRoute.enabled -}}
const defaultHTTPRoute = `{{- if .Values.httpRoute.enabled -}}
{{- $fullName := include "<CHARTNAME>.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- if .Capabilities.APIVersions.Has "gateway.networking.k8s.io/v1" -}}
@ -755,8 +755,8 @@ func Create(name, dir string) (string, error) {
},
{
// httproute.yaml
path: filepath.Join(cdir, HttpRouteFileName),
content: transform(defaultHttpRoute, name),
path: filepath.Join(cdir, HTTPRouteFileName),
content: transform(defaultHTTPRoute, name),
},
{
// deployment.yaml

@ -105,7 +105,7 @@ func TestCreateStarterCmd(t *testing.T) {
t.Errorf("Wrong API version: %q", c.Metadata.APIVersion)
}
expectedNumberOfTemplates := 9
expectedNumberOfTemplates := 10
if l := len(c.Templates); l != expectedNumberOfTemplates {
t.Errorf("Expected %d templates, got %d", expectedNumberOfTemplates, l)
}
@ -173,7 +173,7 @@ func TestCreateStarterAbsoluteCmd(t *testing.T) {
t.Errorf("Wrong API version: %q", c.Metadata.APIVersion)
}
expectedNumberOfTemplates := 9
expectedNumberOfTemplates := 10
if l := len(c.Templates); l != expectedNumberOfTemplates {
t.Errorf("Expected %d templates, got %d", expectedNumberOfTemplates, l)
}

Loading…
Cancel
Save