Skip to content

Commit

Permalink
test: NetworkOutput error
Browse files Browse the repository at this point in the history
  • Loading branch information
jachym-tousek-keboola committed Feb 11, 2025
1 parent 7ecc321 commit c619d25
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,7 @@ func (w *dummyEncoder) Close() error {

type dummyOutput struct {
bytes bytes.Buffer
WriteError error
SyncError error
CloseError error
}
Expand All @@ -684,6 +685,9 @@ func (o *dummyOutput) IsReady() bool {
}

func (o *dummyOutput) Write(ctx context.Context, aligned bool, p []byte) (n int, err error) {
if o.WriteError != nil {
return 0, o.WriteError
}
return o.bytes.Write(p)
}

Expand Down

0 comments on commit c619d25

Please sign in to comment.