Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pkg/build/controller/build/build_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package build
import (
"context"
"fmt"
"io/ioutil"
"os"
"reflect"
"strings"
Expand Down Expand Up @@ -1761,7 +1760,7 @@ func TestHandleControllerConfig(t *testing.T) {
}

// Ensure that the generated configuration is actually valid.
registriesConf, err := ioutil.TempFile("", "registries.conf")
registriesConf, err := os.CreateTemp("", "registries.conf")
defer os.Remove(registriesConf.Name())
if err != nil {
t.Errorf("unexpected error creating temp file: %s", err.Error())
Expand Down
5 changes: 2 additions & 3 deletions pkg/image/controller/imagestream_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net/http"
"reflect"
"strings"
Expand Down Expand Up @@ -478,7 +477,7 @@ func objBody(object interface{}) io.ReadCloser {
if err != nil {
panic(err)
}
return ioutil.NopCloser(bytes.NewReader([]byte(output)))
return io.NopCloser(bytes.NewReader([]byte(output)))
}

func header() http.Header {
Expand All @@ -488,7 +487,7 @@ func header() http.Header {
}

func decode(reader io.ReadCloser, decoder runtime.Decoder) (runtime.Object, error) {
data, err := ioutil.ReadAll(reader)
data, err := io.ReadAll(reader)
if err != nil {
return nil, err
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/template/controller/templateinstance_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package controller
import (
"bytes"
"encoding/json"
"io/ioutil"
"io"
"net/http"
"testing"
"time"
Expand Down Expand Up @@ -72,7 +72,7 @@ func TestControllerCheckReadiness(t *testing.T) {
}
return &http.Response{
StatusCode: http.StatusOK,
Body: ioutil.NopCloser(bytes.NewBuffer(b)),
Body: io.NopCloser(bytes.NewBuffer(b)),
}, nil
})
},
Expand Down