TestResumableRequestHeaderTooMuchFailures: prepare for Go 1.14 changes
Go 1.14 adds quotes around the invalid scheme in the error returned in golang/go@64cfe9f Go 1.13: Get I%27m%20not%20an%20url: unsupported protocol scheme "" Go 1.14: Get "I%27m%20not%20an%20url": unsupported protocol scheme "" This patch updates the test to detect both versions of the error Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
adf066416f
commit
6acfc42094
1 changed files with 3 additions and 2 deletions
|
@ -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))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue