(t *testing.T)
| 562 | } |
| 563 | |
| 564 | func TestRequiredVariableError(t *testing.T) { |
| 565 | loader := NewLoader() |
| 566 | |
| 567 | // Required variable that doesn't exist |
| 568 | result := loader.expandVariables("${REQUIRED_VAR:?This variable is required}") |
| 569 | |
| 570 | // The error marker check happens during validation |
| 571 | // Let's test that the error marker is inserted or result is empty |
| 572 | if result != "" && !containsErrorMarker(result) { |
| 573 | t.Logf("result: %q", result) |
| 574 | } |
| 575 | } |
| 576 | |
| 577 | func containsErrorMarker(s string) bool { |
| 578 | return len(s) > 0 && s[:min(9, len(s))] == "__ERROR__" |
nothing calls this directly
no test coverage detected