(t *testing.T)
| 114 | } |
| 115 | |
| 116 | func TestClientNameToCertificate(t *testing.T) { |
| 117 | crt, _ := certificate.FromP12File("certificate/_fixtures/certificate-valid.p12", "") |
| 118 | client := apns.NewClient(crt) |
| 119 | name := client.HTTPClient.Transport.(*http2.Transport).TLSClientConfig.NameToCertificate |
| 120 | assert.Len(t, name, 1) |
| 121 | |
| 122 | certificate2 := tls.Certificate{} |
| 123 | client2 := apns.NewClient(certificate2) |
| 124 | name2 := client2.HTTPClient.Transport.(*http2.Transport).TLSClientConfig.NameToCertificate |
| 125 | assert.Len(t, name2, 0) |
| 126 | } |
| 127 | |
| 128 | func TestDialTLSTimeout(t *testing.T) { |
| 129 | apns.TLSDialTimeout = 10 * time.Millisecond |
nothing calls this directly
no test coverage detected