Tighten opaque plugin content boundaries
This commit is contained in:
@@ -309,6 +309,18 @@ func TestDockerDistributionBuilderStreamsProgressMarkers(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestAppendBoundedBuilderOutputKeepsTail(t *testing.T) {
|
||||
var output bytes.Buffer
|
||||
appendBoundedBuilderOutput(&output, bytes.Repeat([]byte("a"), maxBuilderDiagnosticOutputBytes))
|
||||
appendBoundedBuilderOutput(&output, []byte("tail"))
|
||||
if output.Len() != maxBuilderDiagnosticOutputBytes {
|
||||
t.Fatalf("builder diagnostic buffer grew beyond cap: %d", output.Len())
|
||||
}
|
||||
if !strings.HasSuffix(output.String(), "tail") {
|
||||
t.Fatalf("builder diagnostic buffer did not keep tail output")
|
||||
}
|
||||
}
|
||||
|
||||
func TestDockerDistributionBuilderRedactsFailureAndTimeout(t *testing.T) {
|
||||
sourceDir := createBuilderSource(t)
|
||||
workspaceDir := t.TempDir()
|
||||
|
||||
Reference in New Issue
Block a user