mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-07 22:05:25 +00:00
delete io/ioutil package. (#5955)
Signed-off-by: yanggang <gang.yang@daocloud.io>
This commit is contained in:
@@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -16,6 +16,7 @@ limitations under the License.
|
||||
package process
|
||||
|
||||
import (
|
||||
"io/fs"
|
||||
"os"
|
||||
"sort"
|
||||
"testing"
|
||||
@@ -43,7 +44,7 @@ func TestNewRegistry(t *testing.T) {
|
||||
}
|
||||
|
||||
type fakeFileInfo struct {
|
||||
os.FileInfo
|
||||
fs.FileInfo
|
||||
mode os.FileMode
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ limitations under the License.
|
||||
package clientmgmt
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
@@ -208,7 +208,7 @@ func TestRestartableObjectStoreDelegatedFunctions(t *testing.T) {
|
||||
Function: "GetObject",
|
||||
Inputs: []interface{}{"bucket", "key"},
|
||||
ExpectedErrorOutputs: []interface{}{nil, errors.Errorf("reset error")},
|
||||
ExpectedDelegateOutputs: []interface{}{ioutil.NopCloser(strings.NewReader("object")), errors.Errorf("delegate error")},
|
||||
ExpectedDelegateOutputs: []interface{}{io.NopCloser(strings.NewReader("object")), errors.Errorf("delegate error")},
|
||||
},
|
||||
restartabletest.RestartableDelegateTest{
|
||||
Function: "ListCommonPrefixes",
|
||||
|
||||
@@ -18,7 +18,7 @@ package framework
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
@@ -59,7 +59,7 @@ func TestStreamReader(t *testing.T) {
|
||||
close: rdr.CloseSend,
|
||||
}
|
||||
|
||||
res, err := ioutil.ReadAll(sr)
|
||||
res, err := io.ReadAll(sr)
|
||||
|
||||
require.Nil(t, err)
|
||||
assert.Equal(t, s, string(res))
|
||||
|
||||
Reference in New Issue
Block a user