mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 20:57:36 +03:00
testutils: make the package public (#4290)
This package can be useful outside of quic-go. We're not making any API guarantees at this point.
This commit is contained in:
parent
d330d2e30d
commit
da25787a3d
3 changed files with 5 additions and 5 deletions
|
@ -21,10 +21,10 @@ import (
|
||||||
mocklogging "github.com/quic-go/quic-go/internal/mocks/logging"
|
mocklogging "github.com/quic-go/quic-go/internal/mocks/logging"
|
||||||
"github.com/quic-go/quic-go/internal/protocol"
|
"github.com/quic-go/quic-go/internal/protocol"
|
||||||
"github.com/quic-go/quic-go/internal/qerr"
|
"github.com/quic-go/quic-go/internal/qerr"
|
||||||
"github.com/quic-go/quic-go/internal/testutils"
|
|
||||||
"github.com/quic-go/quic-go/internal/utils"
|
"github.com/quic-go/quic-go/internal/utils"
|
||||||
"github.com/quic-go/quic-go/internal/wire"
|
"github.com/quic-go/quic-go/internal/wire"
|
||||||
"github.com/quic-go/quic-go/logging"
|
"github.com/quic-go/quic-go/logging"
|
||||||
|
"github.com/quic-go/quic-go/testutils"
|
||||||
|
|
||||||
. "github.com/onsi/ginkgo/v2"
|
. "github.com/onsi/ginkgo/v2"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
|
|
|
@ -15,8 +15,8 @@ import (
|
||||||
"github.com/quic-go/quic-go"
|
"github.com/quic-go/quic-go"
|
||||||
quicproxy "github.com/quic-go/quic-go/integrationtests/tools/proxy"
|
quicproxy "github.com/quic-go/quic-go/integrationtests/tools/proxy"
|
||||||
"github.com/quic-go/quic-go/internal/protocol"
|
"github.com/quic-go/quic-go/internal/protocol"
|
||||||
"github.com/quic-go/quic-go/internal/testutils"
|
|
||||||
"github.com/quic-go/quic-go/internal/wire"
|
"github.com/quic-go/quic-go/internal/wire"
|
||||||
|
"github.com/quic-go/quic-go/testutils"
|
||||||
|
|
||||||
. "github.com/onsi/ginkgo/v2"
|
. "github.com/onsi/ginkgo/v2"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Package testutils contains utilities for simulating packet injection and man-in-the-middle (MITM) attacker tests.
|
||||||
|
// It is not supposed to be used for non-testing purposes.
|
||||||
|
// The API is not guaranteed to be stable.
|
||||||
package testutils
|
package testutils
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -8,9 +11,6 @@ import (
|
||||||
"github.com/quic-go/quic-go/internal/wire"
|
"github.com/quic-go/quic-go/internal/wire"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Utilities for simulating packet injection and man-in-the-middle (MITM) attacker tests.
|
|
||||||
// Do not use for non-testing purposes.
|
|
||||||
|
|
||||||
// writePacket returns a new raw packet with the specified header and payload
|
// writePacket returns a new raw packet with the specified header and payload
|
||||||
func writePacket(hdr *wire.ExtendedHeader, data []byte) []byte {
|
func writePacket(hdr *wire.ExtendedHeader, data []byte) []byte {
|
||||||
b, err := hdr.Append(nil, hdr.Version)
|
b, err := hdr.Append(nil, hdr.Version)
|
Loading…
Add table
Add a link
Reference in a new issue