Skip to content
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

nsqlookupd: improve test coverage #778

Merged

Conversation

kenjones-cisco
Copy link
Contributor

Adds test cases to improve code coverage to protect against potential
compatibility conflicts moving forward.

Existing test cases refactored to leverage common test helpers within
the internal/test package to avoid code duplication and simplify
the testing effort.

@kenjones-cisco
Copy link
Contributor Author

Initial efforts, so far but wanted to start the PR so that it is visible and if there is any feedback on the work being done that it can be shared sooner rather than later.

I'll remove the [WIP] from the title once I think it is ready for merging. All feedback welcome!

@kenjones-cisco kenjones-cisco force-pushed the test/improve-nsqlookupd-coverage branch 2 times, most recently from 1ae2c92 to 40ce04e Compare July 31, 2016 03:27
@kenjones-cisco kenjones-cisco changed the title [WIP] nsqlookupd: Adds test cases nsqlookupd: Adds test cases Jul 31, 2016
@@ -17,10 +17,10 @@ func Equal(t *testing.T, expected, actual interface{}) {
}

func NotEqual(t *testing.T, expected, actual interface{}) {
if !reflect.DeepEqual(expected, actual) {
if reflect.DeepEqual(expected, actual) {
Copy link
Member

Choose a reason for hiding this comment

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

hah, guess we didn't use that very much 😉

@mreiferson
Copy link
Member

@kenjones-cisco thanks, this is really great 😍 ❤️ 💯

@mreiferson mreiferson changed the title nsqlookupd: Adds test cases nsqlookupd: improve test coverage Jul 31, 2016
@kenjones-cisco kenjones-cisco force-pushed the test/improve-nsqlookupd-coverage branch from 40ce04e to b8deec8 Compare August 2, 2016 00:18
@kenjones-cisco
Copy link
Contributor Author

ok, logger.go restored and the use of internal/app/logger.go has been removed from nsqlookupd

@mreiferson
Copy link
Member

@kenjones-cisco thanks, we've been trying to slowly remove our use of go-simplejson throughout the codebase (finished in #367).

It's my fault for not mentioning this earlier on this PR, but would you mind removing go-simplejson here so we don't add more back into the code base? I would understand if you're not up for refactoring this, I can handle it in a rebase of #367 if necessary.

@kenjones-cisco
Copy link
Contributor Author

Sure no problem.

@kenjones-cisco kenjones-cisco force-pushed the test/improve-nsqlookupd-coverage branch from b8deec8 to 2143735 Compare August 3, 2016 03:44
Adds test cases to improve code coverage to protect against potential
compatibility conflicts moving forward.

Existing test cases refactored to leverage common test helpers within
the internal/test package to avoid code duplication and simplify
the testing effort.
@kenjones-cisco kenjones-cisco force-pushed the test/improve-nsqlookupd-coverage branch from 2143735 to 231c9ef Compare August 3, 2016 03:45
@kenjones-cisco
Copy link
Contributor Author

Removed go-simplejson from nsqlookupd tests.

@mreiferson mreiferson merged commit facca8a into nsqio:master Aug 3, 2016
@mreiferson
Copy link
Member

😍👍🏻

@kenjones-cisco kenjones-cisco deleted the test/improve-nsqlookupd-coverage branch August 5, 2016 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants