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:
Marten Seemann
2025-05-10 11:24:21 +08:00
committed by GitHub
parent 8474eddd3a
commit 3f97a011a7
3 changed files with 715 additions and 1090 deletions

View File

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