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
1 changed files with 3 additions and 2 deletions

View File

@ -75,9 +75,10 @@ func TestResumableRequestHeaderTooMuchFailures(t *testing.T) {
}
defer resreq.Close()
expectedError := `Get I%27m%20not%20an%20url: unsupported protocol scheme ""`
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))
}