Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix unit test and bump circle.yml to 1.8 #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
stuarthicks merged 1 commit into master from go1.8-ci
Mar 20, 2017
Merged

Fix unit test and bump circle.yml to 1.8 #25

stuarthicks merged 1 commit into master from go1.8-ci
Mar 20, 2017

Conversation

@sparrc
Copy link
Contributor

@sparrc sparrc commented Mar 20, 2017

Not sure the best way to workaround this one, but this is the test output that I get with go 1.8:

$ go test ./...
--- FAIL: TestReadJSONValidateEmbeddedStruct (0.00s)
 Error Trace: remoteconfig_test.go:619
	Error: 	Error message not equal:
	 	expected: "Failed to decode JSON, with error, json: cannot unmarshal string into Go value of type int64"
	 	received: "Failed to decode JSON, with error, json: cannot unmarshal string into Go struct field SampleConfig.embedded_int of type int64"
--- FAIL: TestRemoteConfigSuite (0.00s)
FAIL
FAIL	github.com/zencoder/go-remote-config	0.028s

The error message has changed, so I changed the test to just be a "contains" check to better future-proof it.

stuarthicks and philcluff reacted with thumbs up emoji
c := &SampleConfig{}
err := ReadJSONValidate(cfgBuffer, c)
assert.EqualError(s.T(), err, "Failed to decode JSON, with error, json: cannot unmarshal string into Go value of type int64")
assert.NotNil(s.T(), err)
Copy link
Contributor

@stuarthicks stuarthicks Mar 20, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's an assert.Error that provide a slightly more obvious error message than you get with assert.NotNil.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link

Coverage Status

Coverage remained the same at 96.41% when pulling 5709c44 on go1.8-ci into b20945b on master.

Copy link
Contributor

@stuarthicks stuarthicks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@stuarthicks stuarthicks merged commit 226c58c into master Mar 20, 2017
@stuarthicks stuarthicks deleted the go1.8-ci branch March 20, 2017 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@stuarthicks stuarthicks stuarthicks approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /