@@ -20,7 +20,6 @@ import (
2020 "encoding/json"
2121 "fmt"
2222 "io"
23- "io/ioutil"
2423 "log"
2524 "net"
2625 "net/http"
@@ -697,7 +696,7 @@ func TestPathEncodeV4(t *testing.T) {
697696}
698697
699698func dummyKey (kind string ) []byte {
700- slurp , err := ioutil .ReadFile (fmt .Sprintf ("./internal/test/dummy_%s" , kind ))
699+ slurp , err := os .ReadFile (fmt .Sprintf ("./internal/test/dummy_%s" , kind ))
701700 if err != nil {
702701 log .Fatal (err )
703702 }
@@ -793,7 +792,7 @@ func TestCondition(t *testing.T) {
793792 t .Parallel ()
794793 gotReq := make (chan * http.Request , 1 )
795794 hc , close := newTestServer (func (w http.ResponseWriter , r * http.Request ) {
796- io .Copy (ioutil .Discard , r .Body )
795+ io .Copy (io .Discard , r .Body )
797796 gotReq <- r
798797 w .WriteHeader (200 )
799798 })
@@ -1441,7 +1440,7 @@ func TestObjectCompose(t *testing.T) {
14411440 gotURL := make (chan string , 1 )
14421441 gotBody := make (chan []byte , 1 )
14431442 hc , close := newTestServer (func (w http.ResponseWriter , r * http.Request ) {
1444- body , _ := ioutil .ReadAll (r .Body )
1443+ body , _ := io .ReadAll (r .Body )
14451444 gotURL <- r .URL .String ()
14461445 gotBody <- body
14471446 w .Write ([]byte ("{}" ))
@@ -1640,7 +1639,7 @@ func TestObjectCompose(t *testing.T) {
16401639func TestEmptyObjectIterator (t * testing.T ) {
16411640 t .Parallel ()
16421641 hClient , close := newTestServer (func (w http.ResponseWriter , r * http.Request ) {
1643- io .Copy (ioutil .Discard , r .Body )
1642+ io .Copy (io .Discard , r .Body )
16441643 fmt .Fprintf (w , "{}" )
16451644 })
16461645 defer close ()
@@ -1661,7 +1660,7 @@ func TestEmptyObjectIterator(t *testing.T) {
16611660func TestEmptyBucketIterator (t * testing.T ) {
16621661 t .Parallel ()
16631662 hClient , close := newTestServer (func (w http.ResponseWriter , r * http.Request ) {
1664- io .Copy (ioutil .Discard , r .Body )
1663+ io .Copy (io .Discard , r .Body )
16651664 fmt .Fprintf (w , "{}" )
16661665 })
16671666 defer close ()
@@ -1698,7 +1697,7 @@ func TestUserProject(t *testing.T) {
16981697 ctx := context .Background ()
16991698 gotURL := make (chan * url.URL , 1 )
17001699 hClient , close := newTestServer (func (w http.ResponseWriter , r * http.Request ) {
1701- io .Copy (ioutil .Discard , r .Body )
1700+ io .Copy (io .Discard , r .Body )
17021701 gotURL <- r .URL
17031702 if strings .Contains (r .URL .String (), "/rewriteTo/" ) {
17041703 res := & raw.RewriteResponse {Done : true }
@@ -2202,7 +2201,7 @@ func TestOperationsWithEndpoint(t *testing.T) {
22022201
22032202 hClient , closeServer := newTestServer (func (w http.ResponseWriter , r * http.Request ) {
22042203 done := make (chan bool , 1 )
2205- io .Copy (ioutil .Discard , r .Body )
2204+ io .Copy (io .Discard , r .Body )
22062205 fmt .Fprintf (w , "{}" )
22072206 go func () {
22082207 gotHost <- r .Host
@@ -2308,7 +2307,7 @@ func TestOperationsWithEndpoint(t *testing.T) {
23082307 return err
23092308 }
23102309
2311- _ , err = io .Copy (ioutil .Discard , rc )
2310+ _ , err = io .Copy (io .Discard , rc )
23122311 if err != nil {
23132312 return err
23142313 }
0 commit comments