Preserve build errors and available failure evidence
This commit is contained in:
@@ -23,3 +23,12 @@ func TestNativeCheckFromChildUsesRootProfileAndSuite(t *testing.T) {
|
||||
t.Fatalf("child invocation error = %v, output = %s", err, output)
|
||||
}
|
||||
}
|
||||
|
||||
func TestNativeBuildClassifiesInvalidVersionBeforeSourceAccess(t *testing.T) {
|
||||
binary := buildWorkflowCLI(t, cliRepositoryRoot(t))
|
||||
command := exec.Command(binary, "build", "--repo", filepath.Join(t.TempDir(), "absent"), "bad-version")
|
||||
output, err := command.CombinedOutput()
|
||||
if exit, ok := err.(*exec.ExitError); !ok || exit.ExitCode() != 2 || !strings.Contains(string(output), "stable vMAJOR.MINOR.PATCH") {
|
||||
t.Fatalf("invalid build error = %v, output = %s", err, output)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user