-
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add support for datagrams * add a test case
- Loading branch information
1 parent
375a5dc
commit a08801e
Showing
6 changed files
with
104 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,20 +7,21 @@ import ( | |
"time" | ||
|
||
"github.com/quic-go/quic-go" | ||
"github.com/quic-go/quic-go/http3" | ||
|
||
"github.com/stretchr/testify/require" | ||
"go.uber.org/mock/gomock" | ||
) | ||
|
||
//go:generate sh -c "go run go.uber.org/mock/mockgen -package webtransport -destination mock_connection_test.go github.com/quic-go/quic-go/http3 Connection && cat mock_connection_test.go | sed s@qerr\\[email protected]@g > tmp.go && mv tmp.go mock_connection_test.go && goimports -w mock_connection_test.go" | ||
//go:generate sh -c "go run go.uber.org/mock/mockgen -package webtransport -destination mock_stream_test.go github.com/quic-go/quic-go Stream && cat mock_stream_test.go | sed s@protocol\\[email protected]@g | sed s@qerr\\[email protected]@g > tmp.go && mv tmp.go mock_stream_test.go && goimports -w mock_stream_test.go" | ||
//go:generate sh -c "go run go.uber.org/mock/mockgen -package webtransport -destination mock_stream_test.go github.com/quic-go/quic-go/http3 Stream && cat mock_stream_test.go | sed s@protocol\\[email protected]@g | sed s@qerr\\[email protected]@g > tmp.go && mv tmp.go mock_stream_test.go && goimports -w mock_stream_test.go" | ||
|
||
type mockRequestStream struct { | ||
*MockStream | ||
c chan struct{} | ||
} | ||
|
||
func newMockRequestStream(ctrl *gomock.Controller) quic.Stream { | ||
func newMockRequestStream(ctrl *gomock.Controller) http3.Stream { | ||
str := NewMockStream(ctrl) | ||
str.EXPECT().Close() | ||
str.EXPECT().CancelRead(gomock.Any()) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters