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

crypto/tls/test: server listens on localhost #397

Merged
merged 1 commit into from
Oct 10, 2023

Conversation

kevinburkesegment
Copy link
Contributor

Previously, the test server would bind to all interfaces, which leads to a very annoying error message on Mac computers, and may expose the server to public access which can only be a bad thing, in a test context.

Updates #381.

@kevinburkesegment
Copy link
Contributor Author

I believe the build failure is a flake: #398

@@ -55,21 +55,21 @@ func (h *grpcHealthCheck) Watch(_ *grpc_health_v1.HealthCheckRequest, _ grpc_hea
return status.Error(codes.Unimplemented, "Watching is not supported")
}

func getLocalHostPort() (int, error) {
func getLocalHostPort() (*net.TCPAddr, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we rename this method now that it's no longer returning only the port? getLocalHostAddr perhaps?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Previously, the test server would bind to all interfaces, which leads
to a very annoying error message on Mac computers, and may expose the
server to public access which can only be a bad thing, in a test
context.
@charleskorn charleskorn enabled auto-merge (squash) October 10, 2023 00:39
@charleskorn charleskorn merged commit 35c5730 into grafana:main Oct 10, 2023
2 checks passed
ying-jeanne pushed a commit that referenced this pull request Nov 2, 2023
Previously, the test server would bind to all interfaces, which leads
to a very annoying error message on Mac computers, and may expose the
server to public access which can only be a bad thing, in a test
context.
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.

None yet

2 participants