Skip to content

Commit

Permalink
Remove 1.11 hack (#721)
Browse files Browse the repository at this point in the history
* Removed some of the 1.11 hacks and updated Travis to use Go 1.11.1.

* Made a note about Go 1.11 tests in the docs.
  • Loading branch information
dbemiller authored and hhhjort committed Oct 23, 2018
1 parent ddc9ec3 commit fc70c53
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ language: go
go:
- '1.9'
- '1.10'
- '1.11'
- '1.11.1'

env:
- DEP_VERSION="0.5.0"
Expand Down
3 changes: 3 additions & 0 deletions docs/developers/automated-tests.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Automated Tests

**NOTE**: The automated tests will not pass on Go 1.11 due to [this bug](https://github.com/golang/go/issues/27275) in Go.
This issue has been fixed in Go 1.11.1.

This project uses [TravisCI](https://travis-ci.org/) to make sure that every PR passes automated tests.
To reproduce these tests locally, use:

Expand Down
9 changes: 9 additions & 0 deletions endpoints/openrtb2/auction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,15 @@ func (e *brokenExchange) HoldAuction(ctx context.Context, bidRequest *openrtb.Bi
return nil, errors.New("Critical, unrecoverable error.")
}

func getMessage(t *testing.T, example []byte) []byte {
if value, err := jsonparser.GetString(example, "message"); err != nil {
t.Fatalf("Error parsing root.message from request: %v.", err)
} else {
return []byte(value)
}
return nil
}

// StoredRequest testing

// Test stored request data
Expand Down
23 changes: 0 additions & 23 deletions endpoints/openrtb2/openrtb2_go111_test.go

This file was deleted.

18 changes: 0 additions & 18 deletions endpoints/openrtb2/openrtb2_test.go

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"message": "Invalid request: request.user.ext object is not valid: json: cannot unmarshal number into Go struct field ExtUser.consent of type string\n",
"message_go1.11": "Invalid request: request.user.ext object is not valid: json: cannot unmarshal number into Go value of type string\n",
"requestPayload": {
"id": "b9c97a4b-cbc4-483d-b2c4-58a19ed5cfc5",
"site": {
Expand Down

0 comments on commit fc70c53

Please sign in to comment.