integration-cli: fix some unhandled errors

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-03-20 20:00:30 +01:00
parent 7b964974e7
commit 1c00755826

View File

@@ -91,8 +91,8 @@ func (s *DockerAPISuite) TestPostContainersAttachContainerNotFound(c *testing.T)
func (s *DockerAPISuite) TestGetContainersWsAttachContainerNotFound(c *testing.T) {
ctx := testutil.GetContext(c)
res, body, err := request.Get(ctx, "/containers/doesnotexist/attach/ws")
assert.Equal(c, res.StatusCode, http.StatusNotFound)
assert.NilError(c, err)
assert.Equal(c, res.StatusCode, http.StatusNotFound)
b, err := request.ReadBody(body)
assert.NilError(c, err)
expected := "No such container: doesnotexist"
@@ -207,7 +207,7 @@ func (s *DockerAPISuite) TestPostContainersAttach(c *testing.T) {
assert.NilError(c, err)
defer resp.Conn.Close()
resp.Conn.SetReadDeadline(time.Now().Add(time.Second))
assert.NilError(c, resp.Conn.SetReadDeadline(time.Now().Add(time.Second)))
_, err = resp.Conn.Write([]byte("success"))
assert.NilError(c, err)