forked from quic-go/quic-go
http3: migrate the client tests away from Ginkgo (#5096)
* http3: migrate the client tests away from Ginkgo * http3: add a client settings test
This commit is contained in:
@@ -184,6 +184,16 @@ var _ = Describe("Request Stream", func() {
|
||||
})
|
||||
|
||||
It("reads after the response", func() {
|
||||
encodeResponse := func(status int) []byte {
|
||||
buf := &bytes.Buffer{}
|
||||
rstr := mockquic.NewMockStream(mockCtrl)
|
||||
rstr.EXPECT().Write(gomock.Any()).Do(buf.Write).AnyTimes()
|
||||
rw := newResponseWriter(newStream(rstr, nil, nil, func(r io.Reader, u uint64) error { return nil }), nil, false, nil)
|
||||
rw.WriteHeader(status)
|
||||
rw.Flush()
|
||||
return buf.Bytes()
|
||||
}
|
||||
|
||||
req, err := http.NewRequest(http.MethodGet, "https://quic-go.net", nil)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
qstr.EXPECT().Write(gomock.Any()).AnyTimes()
|
||||
|
||||
Reference in New Issue
Block a user