Commit 146c61af authored by Henry Nash's avatar Henry Nash Committed by Matthew Fisher

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: 's avatarHenry Nash <henry.nash@uk.ibm.com>
parent adce632c
......@@ -143,8 +143,9 @@ func TestCreateStarterCmd(t *testing.T) {
t.Errorf("Wrong API version: %q", c.Metadata.ApiVersion)
}
if l := len(c.Templates); l != 7 {
t.Errorf("Expected 6 templates, got %d", l)
expectedTemplateCount := 7
if l := len(c.Templates); l != expectedTemplateCount {
t.Errorf("Expected %d templates, got %d", expectedTemplateCount, l)
}
found := false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment