(t *testing.T)
| 1474 | } |
| 1475 | } |
| 1476 | func TestTraceableError_ExecutingForm(t *testing.T) { |
| 1477 | testStrings := [][]string{ |
| 1478 | {"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"}, |
| 1479 | {"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"}, |
| 1480 | } |
| 1481 | for _, errTuple := range testStrings { |
| 1482 | errString := errTuple[0] |
| 1483 | expectedLocation := errTuple[1] |
| 1484 | trace, done := parseTemplateExecutingAtErrorType(errString) |
| 1485 | if !done { |
| 1486 | t.Error("Expected parse to pass but did not") |
| 1487 | } |
| 1488 | if trace.location != expectedLocation { |
| 1489 | t.Errorf("Expected %q, got %q", expectedLocation, trace.location) |
| 1490 | } |
| 1491 | } |
| 1492 | } |
| 1493 | |
| 1494 | func TestTraceableError_NoTemplateForm(t *testing.T) { |
| 1495 | testStrings := []string{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…