(host string, validFor time.Duration)
| 730 | } |
| 731 | |
| 732 | func makeCert(host string, validFor time.Duration) tls.Certificate { |
| 733 | certPEM, keyPEM := makePEM(host, validFor) |
| 734 | cert, err := tls.X509KeyPair(certPEM, keyPEM) |
| 735 | if err != nil { |
| 736 | panic("Failed to create certificate: " + err.Error()) |
| 737 | } |
| 738 | return cert |
| 739 | } |
| 740 | |
| 741 | func waitFor(timeout time.Duration, up func() bool) bool { |
| 742 | until := time.Now().Add(timeout) |
no test coverage detected