fix: preserve platform builder failure diagnostics
This commit is contained in:
@@ -364,6 +364,18 @@ func TestDockerDistributionBuilderRedactsFailureAndTimeout(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestSafeBuilderFailureFallsBackToCommandError(t *testing.T) {
|
||||
secret := "sensitive-component-key"
|
||||
message := safeBuilderFailureWithCommandError(
|
||||
[]byte("__platform_builder_progress__|72|build_compile: compiling run target executable\n"),
|
||||
errors.New("exit status 1: failed to start container with "+secret+" /private/platform/build"),
|
||||
secret,
|
||||
)
|
||||
if message != "exit status 1: failed to start container with [redacted] [redacted-path]" {
|
||||
t.Fatalf("unexpected command error fallback: %q", message)
|
||||
}
|
||||
}
|
||||
|
||||
func TestBuilderJobFailureMessageRedactsSensitiveValuesAndHostPaths(t *testing.T) {
|
||||
const secret = "sensitive-component-key"
|
||||
message := builderJobFailureMessage(errors.New(secret+" /private/platform/build/input/auth-key"), secret)
|
||||
|
||||
Reference in New Issue
Block a user