Skip to content

Commit

Permalink
Merge pull request #53 from darklynx/test_fix_go1.14
Browse files Browse the repository at this point in the history
fixed tests for changes in go 1.14 introduced by this PR:
  • Loading branch information
darklynx committed Apr 2, 2020
2 parents af2c16f + fc7914b commit 54afc3d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ go:
- 1.11.x
- 1.12.x
- 1.13.x
- 1.14.x
before_install:
- mysql -e "CREATE DATABASE IF NOT EXISTS baskets ;"
- mysql -e "CREATE USER 'rbaskets'@'%' IDENTIFIED BY 'pwd' ;"
Expand Down
3 changes: 2 additions & 1 deletion baskets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ func TestRequestData_Forward_BrokenURL(t *testing.T) {
r, e := data.Forward(new(http.Client), config, basket)
assert.Nil(t, r, "response is not expected")
assert.NotNil(t, e, "error is expected")
assert.EqualError(t, e, "Invalid forward URL: abc - parse abc: invalid URI for request", "wrong error")
assert.Contains(t, e.Error(), "Invalid forward URL: abc - parse", "unexpected error message")
assert.Contains(t, e.Error(), "invalid URI for request", "unexpected error message")
}

func TestRequestData_Forward_UnreachableURL(t *testing.T) {
Expand Down

0 comments on commit 54afc3d

Please sign in to comment.