Browse Source

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>
Brad Fitzpatrick 10 years ago
parent
commit
ddbc69e05b
1 changed files with 3 additions and 6 deletions
  1. 3 6
      http2/server_test.go

+ 3 - 6
http2/server_test.go

@@ -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()