make ConnectionState usable during the handshake

This commit is contained in:
Marten Seemann 2022-12-22 23:13:34 +13:00
parent b52d34008f
commit 45b489b6f6
9 changed files with 37 additions and 23 deletions

View file

@ -163,6 +163,7 @@ var _ = Describe("Server", func() {
addr := &net.UDPAddr{IP: net.IPv4(127, 0, 0, 1), Port: 1337}
conn.EXPECT().RemoteAddr().Return(addr).AnyTimes()
conn.EXPECT().LocalAddr().AnyTimes()
conn.EXPECT().ConnectionState().Return(quic.ConnectionState{}).AnyTimes()
})
It("calls the HTTP handler function", func() {
@ -632,6 +633,7 @@ var _ = Describe("Server", func() {
conn.EXPECT().AcceptStream(gomock.Any()).Return(nil, errors.New("done"))
conn.EXPECT().RemoteAddr().Return(addr).AnyTimes()
conn.EXPECT().LocalAddr().AnyTimes()
conn.EXPECT().ConnectionState().Return(quic.ConnectionState{}).AnyTimes()
})
AfterEach(func() { testDone <- struct{}{} })