Add flags to test runner allowing user to supply TLS cert+key, port, and bind address for in-process reference server(s) #735
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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).