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

Bump test coverage to 90% #395

Merged
merged 29 commits into from
Nov 18, 2022
Merged

Bump test coverage to 90% #395

merged 29 commits into from
Nov 18, 2022

Conversation

joshcarp
Copy link
Contributor

Adds misc tests, almost to 90%

@joshcarp joshcarp changed the title Bump test coverage to 9̶0̶%̶ 88.3% Bump test coverage to 90% Nov 17, 2022
Copy link
Member

@akshayjshah akshayjshah left a 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)
Copy link
Member

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?

Copy link
Contributor Author

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

@joshcarp joshcarp merged commit c6b5562 into main Nov 18, 2022
@joshcarp joshcarp deleted the test/90 branch November 18, 2022 16:01
akshayjshah pushed a commit that referenced this pull request Jul 26, 2023
Adds more tests to 90% test coverage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants