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

Add flags to test runner allowing user to supply TLS cert+key, port, and bind address for in-process reference server(s) #735

Merged
merged 2 commits into from Dec 12, 2023

Conversation

jhump
Copy link
Member

@jhump jhump commented Dec 12, 2023

In certain environments, it may not be possible to configure trust roots and use self-signed certificates. Also, it may be necessary to know/configure the listen port so that the reference server can be properly exported for use by an external client. For these reasons, this adds flags to the test runner that allow the user to supply a TLS cert and key and to configure the port and bind address on which reference server(s) listen. Without these, the servers will generate a self-signed cert+key and will listen on "127.0.0.1:0".

This caught an issue in the HTTP/3 server: it's CloseGracefully method is not actually implemented!. WTF? 😠

This was an issue because when all server process are using the same port, this meant that the HTTP/3 process never closed and never stopped its listener, so the next process started was unable to re-use the port.

In order to troubleshoot that, I also added code to the server runner so that it will propagate lines to stderr that don't appear to be sideband feedback about the client under test and to the in-process starter to log any errors to stderr (they were previously being swallowed 😢).

While in here, I also updated the grpc-go server so that it will report an error if it gets a configuration that it can't handler (instead of proceeding to start-up an incorrectly configured server).

@jhump jhump requested a review from smaye81 December 12, 2023 21:20
@jhump
Copy link
Member Author

jhump commented Dec 12, 2023

cc @srikrsna-buf

@jhump jhump enabled auto-merge (squash) December 12, 2023 23:13
@jhump jhump merged commit 27b4beb into main Dec 12, 2023
4 checks passed
@jhump jhump deleted the jh/tls-and-port-args branch December 12, 2023 23:15
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