mirror of
https://github.com/containers/gvisor-tap-vsock.git
synced 2025-10-07 09:40:56 +08:00
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:

committed by
Anjan Nath

parent
89efd2bdb9
commit
8c72b59df3
@@ -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())
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user