Skip to content

Commit

Permalink
tests/e2e: use StreamWithContext instead of Stream
Browse files Browse the repository at this point in the history
golangci reported:
 tests/e2e/helpers/exec.go:49:9 staticcheck  SA1019: exec.Stream is
 deprecated: use StreamWithContext instead to avoid possible resource
 leaks. See kubernetes/kubernetes#103177 for
 details.

Signed-off-by: Kornilios Kourtis <kornilios@isovalent.com>
  • Loading branch information
kkourt committed Apr 5, 2023
1 parent 7f4d011 commit 87112ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/e2e/helpers/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func ExecInPod(ctx context.Context, client klient.Client, namespace, pod, contai
return fmt.Errorf("error while creating executor: %w", err)
}

return exec.Stream(remotecommand.StreamOptions{
return exec.StreamWithContext(ctx, remotecommand.StreamOptions{
Stdout: stdout,
Stderr: stderr,
})
Expand Down

0 comments on commit 87112ef

Please sign in to comment.