tylerstillwater / graceful

Graceful is a Go package enabling graceful shutdown of an http.Handler server.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tests fail with Go 1.10

stapelberg opened this issue · comments

% go test gopkg.in/tylerb/graceful.v1/...
--- FAIL: TestGracefulForwardsConnState (0.25s)
	graceful_test.go:328: Incorrect connection state tracking.
		  actual: map[new:8 active:8]
		expected: map[new:8 active:8 closed:8]
2018/02/16 18:36:03 http: TLS handshake error from [::1]:45106: remote error: tls: bad certificate
--- FAIL: TestHTTP2ListenAndServeTLS (0.10s)
	http2_test.go:48: Error encountered while connecting to test server: Get https://localhost:9654: tls: failed to parse certificate from server: x509: cannot parse dnsName "Test Intermediate CA"
2018/02/16 18:36:04 http: TLS handshake error from [::1]:45108: remote error: tls: bad certificate
--- FAIL: TestHTTP2ListenAndServeTLSConfig (0.10s)
	http2_test.go:48: Error encountered while connecting to test server: Get https://localhost:9654: tls: failed to parse certificate from server: x509: cannot parse dnsName "Test Intermediate CA"
FAIL
FAIL	gopkg.in/tylerb/graceful.v1	4.665s
?   	gopkg.in/tylerb/graceful.v1/tests	[no test files]

I think the test-fixtures/* files need to be re-generated with a name that can be parsed.

Thanks!

Or perhaps we should just switch to https://golang.org/pkg/net/http/httptest/#NewTLSServer instead?