File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -244,7 +244,10 @@ func TestReplaceVeleroWithOADP_RunFunctionWrapper(t *testing.T) {
244244
245245 // Read captured output
246246 var buf bytes.Buffer
247- io .Copy (& buf , r )
247+ _ , err := io .Copy (& buf , r )
248+ if err != nil {
249+ t .Errorf ("Error copying output: %v" , err )
250+ }
248251 output := buf .String ()
249252
250253 if ! outputCaptured {
@@ -412,9 +415,9 @@ func TestReplaceVeleroWithOADP_PreservesProperNouns(t *testing.T) {
412415// TestReplaceVeleroWithOADP_RunOutputPreservesProperNouns tests Run wrapper preserves "velero" references
413416func TestReplaceVeleroWithOADP_RunOutputPreservesProperNouns (t * testing.T ) {
414417 tests := []struct {
415- name string
416- outputFunc func ()
417- shouldContain []string
418+ name string
419+ outputFunc func ()
420+ shouldContain []string
418421 shouldNotContain []string
419422 }{
420423 {
@@ -468,7 +471,10 @@ func TestReplaceVeleroWithOADP_RunOutputPreservesProperNouns(t *testing.T) {
468471
469472 // Read captured output
470473 var buf bytes.Buffer
471- io .Copy (& buf , r )
474+ _ , err := io .Copy (& buf , r )
475+ if err != nil {
476+ t .Errorf ("Error copying output: %v" , err )
477+ }
472478 output := buf .String ()
473479
474480 for _ , should := range tt .shouldContain {
@@ -485,4 +491,3 @@ func TestReplaceVeleroWithOADP_RunOutputPreservesProperNouns(t *testing.T) {
485491 })
486492 }
487493}
488-
You can’t perform that action at this time.
0 commit comments