Use ioutil.ReadFile instead of os.ReadFile
Because it works on older golang versions too.
This commit is contained in:
parent
b793b9a17e
commit
61d64fc4c6
@ -516,7 +516,7 @@ func TestImpersonationProxy(t *testing.T) { //nolint:gocyclo // yeah, it's compl
|
|||||||
localEchoFile := filepath.Join(tempDir, filepath.Base(remoteEchoFile))
|
localEchoFile := filepath.Join(tempDir, filepath.Base(remoteEchoFile))
|
||||||
_, _, err = runKubectl("cp", fmt.Sprintf("%s/%s:%s", env.ConciergeNamespace, podName, remoteEchoFile), localEchoFile)
|
_, _, err = runKubectl("cp", fmt.Sprintf("%s/%s:%s", env.ConciergeNamespace, podName, remoteEchoFile), localEchoFile)
|
||||||
require.NoError(t, err, `"kubectl cp" failed`)
|
require.NoError(t, err, `"kubectl cp" failed`)
|
||||||
localEchoFileData, err := os.ReadFile(localEchoFile)
|
localEchoFileData, err := ioutil.ReadFile(localEchoFile)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
require.Equal(t, echoString+"\n", string(localEchoFileData))
|
require.Equal(t, echoString+"\n", string(localEchoFileData))
|
||||||
defer func() {
|
defer func() {
|
||||||
|
Loading…
Reference in New Issue
Block a user