Skip to content

Commit

Permalink
src: better debugging
Browse files Browse the repository at this point in the history
Signed-off-by: Matej Vasek <mvasek@redhat.com>
  • Loading branch information
matejvasek committed Jul 26, 2023
1 parent a2834c2 commit 3208508
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/oci/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func TestBuilder_Concurrency(t *testing.T) {
}
go func() {
if err := builder1.Build(context.Background(), f, TestPlatforms); err != nil {
fmt.Fprintf(os.Stderr, "test build error %v", err)
t.Errorf("test build error %v", err)
}
}()

Expand All @@ -107,10 +107,13 @@ func TestBuilder_Concurrency(t *testing.T) {

// Build B
builder2 := NewBuilder("builder2", true)
builder2.buildFn = func(config *buildConfig, platform v1.Platform) (v1.Descriptor, v1.Layer, error) {
return v1.Descriptor{}, nil, fmt.Errorf("should not have been invoked")
}
go func() {
err = builder2.Build(context.Background(), f, TestPlatforms)
if !errors.As(err, &ErrBuildInProgress{}) {
fmt.Fprintf(os.Stderr, "test build error %v", err)
t.Errorf("test build error %v", err)
}
}()

Expand Down

0 comments on commit 3208508

Please sign in to comment.