1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #40470 from thaJeztah/loosen_error_check_assert

TestResumableRequestHeaderTooMuchFailures: prepare for Go 1.14 changes
This commit is contained in:
Tibor Vass 2020-02-10 14:10:20 -08:00 committed by GitHub
commit 266d744b52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -75,9 +75,10 @@ func TestResumableRequestHeaderTooMuchFailures(t *testing.T) {
} }
defer resreq.Close() defer resreq.Close()
expectedError := `Get I%27m%20not%20an%20url: unsupported protocol scheme ""`
read, err := resreq.Read([]byte{}) read, err := resreq.Read([]byte{})
assert.Check(t, is.Error(err, expectedError)) assert.Assert(t, err != nil)
assert.Check(t, is.ErrorContains(err, "unsupported protocol scheme"))
assert.Check(t, is.ErrorContains(err, "I%27m%20not%20an%20url"))
assert.Check(t, is.Equal(0, read)) assert.Check(t, is.Equal(0, read))
} }