ioutil: Switch away from deprecated package

ioutil has been deprecated since golang 1.16.
This commit uses the replacement methods from the os or io packages.
This should fix some golangci-lint CI failures.

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
This commit is contained in:
Christophe Fergeau
2022-09-01 14:36:34 +02:00
committed by Anjan Nath
parent 89efd2bdb9
commit 8c72b59df3
8 changed files with 15 additions and 19 deletions

View File

@@ -5,7 +5,6 @@ package e2e
import (
"context"
"io"
"io/ioutil"
"net"
"net/http"
"os"
@@ -80,10 +79,10 @@ var _ = Describe("connectivity", func() {
reader, err := cmd.StdoutPipe()
Expect(err).ShouldNot(HaveOccurred())
cmd.Start()
output, err := ioutil.ReadAll(reader)
output, err := io.ReadAll(reader)
Expect(err).ShouldNot(HaveOccurred())
cmd.Wait()
Expect(strings.Contains(string(output), `[info ] test: Listening on: \\.\pipe\fake_docker_engine`)).Should(BeTrue())
Expect(strings.Contains(string(output),`[debug] test: Socket forward established`)).Should(BeTrue())
Expect(strings.Contains(string(output), `[debug] test: Socket forward established`)).Should(BeTrue())
})
})