mirror of
https://github.com/golang/net.git
synced 2026-03-31 10:27:08 +09:00
http2: fix broken test after ConfigureServer change
ConfigureServer now returns an error if your config is wrong. It doesn't attempt to fix it for you. Adjust this test accordingly. Change-Id: Ie3de878ff58cef454de0ec9ab1a10459ca0ddd2d Reviewed-on: https://go-review.googlesource.com/16061 Reviewed-by: Adam Langley <agl@golang.org>
This commit is contained in:
@@ -2115,12 +2115,9 @@ func TestServer_Advertises_Common_Cipher(t *testing.T) {
|
||||
c.CipherSuites = []uint16{requiredSuite}
|
||||
}, func(ts *httptest.Server) {
|
||||
var srv *http.Server = ts.Config
|
||||
// Have the server configured with one specific cipher suite
|
||||
// which is banned. This tests that ConfigureServer ends up
|
||||
// adding the good one to this list.
|
||||
srv.TLSConfig = &tls.Config{
|
||||
CipherSuites: []uint16{tls.TLS_RSA_WITH_AES_128_CBC_SHA}, // just a banned one
|
||||
}
|
||||
// Have the server configured with no specific cipher suites.
|
||||
// This tests that Go's defaults include the required one.
|
||||
srv.TLSConfig = nil
|
||||
})
|
||||
defer st.Close()
|
||||
st.greet()
|
||||
|
||||
Reference in New Issue
Block a user