Merge pull request #5 from jessesimpson36/fix-pkg-engine-error-parsing-r1

test: passes now
pull/31198/head
Terry Howe 2 weeks ago committed by GitHub
commit 129b941eeb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1445,8 +1445,8 @@ func TestTraceableError_SimpleForm(t *testing.T) {
} }
func TestTraceableError_ExecutingForm(t *testing.T) { func TestTraceableError_ExecutingForm(t *testing.T) {
testStrings := [][]string{ testStrings := [][]string{
{"template: executing \"function_not_found/templates/secret.yaml\" at <include \"name\" .>: ", "function_not_found/templates/secret.yaml"}, {"function_not_found/templates/secret.yaml:6:11: executing \"function_not_found/templates/secret.yaml\" at <include \"name\" .>: ", "function_not_found/templates/secret.yaml:6:11"},
{"template: executing \"name\" at <include \"common.names.get_name\" .>: ", "name"}, {"divide_by_zero/templates/secret.yaml:6:11: executing \"divide_by_zero/templates/secret.yaml\" at <include \"division\" .>: ", "divide_by_zero/templates/secret.yaml:6:11"},
} }
for _, errTuple := range testStrings { for _, errTuple := range testStrings {
errString := errTuple[0] errString := errTuple[0]
@ -1466,7 +1466,7 @@ func TestTraceableError_NoTemplateForm(t *testing.T) {
"no template \"common.names.get_name\" associated with template \"gotpl\"", "no template \"common.names.get_name\" associated with template \"gotpl\"",
} }
for _, errString := range testStrings { for _, errString := range testStrings {
trace, done := parseTemplateNoTemplateError(errString, "") trace, done := parseTemplateNoTemplateError(errString, errString)
if !done { if !done {
t.Errorf("Expected parse to pass but did not") t.Errorf("Expected parse to pass but did not")
} }

Loading…
Cancel
Save