(t *testing.T)
| 186 | } |
| 187 | |
| 188 | func (s) TestWithTransportCredentialsTLS(t *testing.T) { |
| 189 | ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond) |
| 190 | defer cancel() |
| 191 | creds, err := credentials.NewClientTLSFromFile(testdata.Path("x509/server_ca_cert.pem"), "x.test.example.com") |
| 192 | if err != nil { |
| 193 | t.Fatalf("Failed to create credentials %v", err) |
| 194 | } |
| 195 | conn, err := DialContext(ctx, "passthrough:///Non-Existent.Server:80", WithTransportCredentials(creds), WithBlock()) |
| 196 | if err == nil { |
| 197 | conn.Close() |
| 198 | } |
| 199 | if err != context.DeadlineExceeded { |
| 200 | t.Fatalf("Dial(_, _) = %v, %v, want %v", conn, err, context.DeadlineExceeded) |
| 201 | } |
| 202 | } |
| 203 | |
| 204 | func (s) TestDialContextCancel(t *testing.T) { |
| 205 | ctx, cancel := context.WithCancel(context.Background()) |
nothing calls this directly
no test coverage detected