(t *testing.T)
| 170 | } |
| 171 | |
| 172 | func (s) TestServerHandshakeReturnsAuthInfo(t *testing.T) { |
| 173 | done := make(chan AuthInfo, 1) |
| 174 | lis := launchServer(t, gRPCServerHandshake, done) |
| 175 | defer lis.Close() |
| 176 | clientAuthInfo := clientHandle(t, tlsClientHandshake, lis.Addr().String()) |
| 177 | // wait until server sends serverAuthInfo or fails. |
| 178 | serverAuthInfo, ok := <-done |
| 179 | if !ok { |
| 180 | t.Fatalf("Error at server-side") |
| 181 | } |
| 182 | if !compare(clientAuthInfo, serverAuthInfo) { |
| 183 | t.Fatalf("ServerHandshake(_) = %v, want %v.", serverAuthInfo, clientAuthInfo) |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | func (s) TestServerAndClientHandshake(t *testing.T) { |
| 188 | done := make(chan AuthInfo, 1) |
nothing calls this directly
no test coverage detected