fix(helm): Correct and improve resilence of template check in unit test (#5010)

Make the current check for the number of templates on create more
resilient by using a varible to store the expected number
of templates. In addition, fix the error message so that it displays
the correct number expected of templates.

Closes #5009

Signed-off-by: Henry Nash <henry.nash@uk.ibm.com>
pull/5022/head
Henry Nash 6 years ago committed by Matthew Fisher
parent adce632c83
commit 146c61af37

@ -143,8 +143,9 @@ func TestCreateStarterCmd(t *testing.T) {
t.Errorf("Wrong API version: %q", c.Metadata.ApiVersion) t.Errorf("Wrong API version: %q", c.Metadata.ApiVersion)
} }
if l := len(c.Templates); l != 7 { expectedTemplateCount := 7
t.Errorf("Expected 6 templates, got %d", l) if l := len(c.Templates); l != expectedTemplateCount {
t.Errorf("Expected %d templates, got %d", expectedTemplateCount, l)
} }
found := false found := false

Loading…
Cancel
Save