testServer is a no-op server which listens on a local TCP port for incoming connections, and performs a manual TLS handshake on the received raw connection using a user specified handshake function. It then makes the result of the handshake operation available through a channel for tests to inspect.
| 74 | // result of the handshake operation available through a channel for tests to |
| 75 | // inspect. Tests should stop the testServer as part of their cleanup. |
| 76 | type testServer struct { |
| 77 | lis net.Listener |
| 78 | address string // Listening address of the test server. |
| 79 | handshakeFunc testHandshakeFunc // Test specified handshake function. |
| 80 | hsResult *testutils.Channel // Channel to deliver handshake results. |
| 81 | } |
| 82 | |
| 83 | // handshakeResult wraps the result of the handshake operation on the test |
| 84 | // server. It consists of TLS connection state and an error, if the handshake |
nothing calls this directly
no outgoing calls
no test coverage detected