mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-03 20:27:35 +03:00
move the logging mock implementations to a separate package
This commit is contained in:
parent
bed802aee5
commit
e0824e3163
9 changed files with 30 additions and 30 deletions
|
@ -3,7 +3,7 @@ package quic
|
|||
import (
|
||||
"net"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/mocks"
|
||||
mocklogging "github.com/lucas-clemente/quic-go/internal/mocks/logging"
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
|
@ -25,7 +25,7 @@ var _ = Describe("Client Multiplexer", func() {
|
|||
pconn := newMockPacketConn()
|
||||
pconn.addr = &net.UDPAddr{IP: net.IPv4(1, 2, 3, 4), Port: 4321}
|
||||
conn := testConn{PacketConn: pconn}
|
||||
tracer := mocks.NewMockTracer(mockCtrl)
|
||||
tracer := mocklogging.NewMockTracer(mockCtrl)
|
||||
_, err := getMultiplexer().AddConn(conn, 8, []byte("foobar"), tracer)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
conn.counter++
|
||||
|
@ -52,9 +52,9 @@ var _ = Describe("Client Multiplexer", func() {
|
|||
|
||||
It("errors when adding an existing conn with different tracers", func() {
|
||||
conn := newMockPacketConn()
|
||||
_, err := getMultiplexer().AddConn(conn, 7, nil, mocks.NewMockTracer(mockCtrl))
|
||||
_, err := getMultiplexer().AddConn(conn, 7, nil, mocklogging.NewMockTracer(mockCtrl))
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
_, err = getMultiplexer().AddConn(conn, 7, nil, mocks.NewMockTracer(mockCtrl))
|
||||
_, err = getMultiplexer().AddConn(conn, 7, nil, mocklogging.NewMockTracer(mockCtrl))
|
||||
Expect(err).To(MatchError("cannot use different tracers on the same packet conn"))
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue