diff options
Diffstat (limited to 'vendor/golang.org/x/net/http2/server_test.go')
-rw-r--r-- | vendor/golang.org/x/net/http2/server_test.go | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/vendor/golang.org/x/net/http2/server_test.go b/vendor/golang.org/x/net/http2/server_test.go index 591a0c2e6..5cb249056 100644 --- a/vendor/golang.org/x/net/http2/server_test.go +++ b/vendor/golang.org/x/net/http2/server_test.go @@ -142,7 +142,6 @@ func newServerTester(t testing.TB, handler http.HandlerFunc, opts ...interface{} st.scMu.Lock() defer st.scMu.Unlock() st.sc = v - st.sc.testHookCh = make(chan func(int)) } log.SetOutput(io.MultiWriter(stderrv(), twriter{t: t, st: st})) if !onlyServer { @@ -187,7 +186,7 @@ func (st *serverTester) addLogFilter(phrase string) { func (st *serverTester) stream(id uint32) *stream { ch := make(chan *stream, 1) - st.sc.testHookCh <- func(int) { + st.sc.serveMsgCh <- func(int) { ch <- st.sc.streams[id] } return <-ch @@ -195,7 +194,7 @@ func (st *serverTester) stream(id uint32) *stream { func (st *serverTester) streamState(id uint32) streamState { ch := make(chan streamState, 1) - st.sc.testHookCh <- func(int) { + st.sc.serveMsgCh <- func(int) { state, _ := st.sc.state(id) ch <- state } @@ -205,7 +204,7 @@ func (st *serverTester) streamState(id uint32) streamState { // loopNum reports how many times this conn's select loop has gone around. func (st *serverTester) loopNum() int { lastc := make(chan int, 1) - st.sc.testHookCh <- func(loopNum int) { + st.sc.serveMsgCh <- func(loopNum int) { lastc <- loopNum } return <-lastc @@ -2432,6 +2431,7 @@ func TestServer_Rejects_TLSBadCipher(t *testing.T) { tls.TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, + cipher_TLS_RSA_WITH_AES_128_CBC_SHA256, } }) defer st.Close() @@ -3414,8 +3414,9 @@ func TestServerHandleCustomConn(t *testing.T) { }() const testString = "my custom ConnectionState" fakeConnState := tls.ConnectionState{ - ServerName: testString, - Version: tls.VersionTLS12, + ServerName: testString, + Version: tls.VersionTLS12, + CipherSuite: cipher_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, } go s.ServeConn(connStateConn{c1, fakeConnState}, &ServeConnOpts{ BaseConfig: &http.Server{ |