-
Notifications
You must be signed in to change notification settings - Fork 112
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
Bump test coverage to 90% #395
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome 🎉 Thank you for taking this on, @joshcarp!
Once you make the suggested changes and tests/lint/etc are passing, go ahead and merge this.
connectClient := pingv1connect.NewPingServiceClient(server.Client(), server.URL) | ||
connectResp, err := connectClient.Ping(context.Background(), connect.NewRequest(&pingv1.PingRequest{})) | ||
assert.NotNil(t, err) | ||
assert.Nil(t, connectResp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do these last four lines test anything that's not covered elsewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes actually; the client panics when the server sends a zero connect error code which has an open issue at the moment: https://github.com/bufbuild/connect-go/issues/396
You can't get the http status code from a connect unary client (that I know of) so doing both was the only way I came up with
Adds more tests to 90% test coverage
Adds misc tests, almost to 90%