update gomock to v1.5.0

This commit is contained in:
Marten Seemann 2021-02-20 09:06:31 +08:00
parent 972a08c40d
commit 383f1a6e89
44 changed files with 781 additions and 771 deletions

View file

@ -15,312 +15,312 @@ import (
wire "github.com/lucas-clemente/quic-go/internal/wire"
)
// MockConnectionTracer is a mock of ConnectionTracer interface
// MockConnectionTracer is a mock of ConnectionTracer interface.
type MockConnectionTracer struct {
ctrl *gomock.Controller
recorder *MockConnectionTracerMockRecorder
}
// MockConnectionTracerMockRecorder is the mock recorder for MockConnectionTracer
// MockConnectionTracerMockRecorder is the mock recorder for MockConnectionTracer.
type MockConnectionTracerMockRecorder struct {
mock *MockConnectionTracer
}
// NewMockConnectionTracer creates a new mock instance
// NewMockConnectionTracer creates a new mock instance.
func NewMockConnectionTracer(ctrl *gomock.Controller) *MockConnectionTracer {
mock := &MockConnectionTracer{ctrl: ctrl}
mock.recorder = &MockConnectionTracerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockConnectionTracer) EXPECT() *MockConnectionTracerMockRecorder {
return m.recorder
}
// BufferedPacket mocks base method
// BufferedPacket mocks base method.
func (m *MockConnectionTracer) BufferedPacket(arg0 protocol.PacketType) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "BufferedPacket", arg0)
}
// BufferedPacket indicates an expected call of BufferedPacket
// BufferedPacket indicates an expected call of BufferedPacket.
func (mr *MockConnectionTracerMockRecorder) BufferedPacket(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BufferedPacket", reflect.TypeOf((*MockConnectionTracer)(nil).BufferedPacket), arg0)
}
// Close mocks base method
// Close mocks base method.
func (m *MockConnectionTracer) Close() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Close")
}
// Close indicates an expected call of Close
// Close indicates an expected call of Close.
func (mr *MockConnectionTracerMockRecorder) Close() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockConnectionTracer)(nil).Close))
}
// ClosedConnection mocks base method
// ClosedConnection mocks base method.
func (m *MockConnectionTracer) ClosedConnection(arg0 CloseReason) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "ClosedConnection", arg0)
}
// ClosedConnection indicates an expected call of ClosedConnection
// ClosedConnection indicates an expected call of ClosedConnection.
func (mr *MockConnectionTracerMockRecorder) ClosedConnection(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClosedConnection", reflect.TypeOf((*MockConnectionTracer)(nil).ClosedConnection), arg0)
}
// Debug mocks base method
// Debug mocks base method.
func (m *MockConnectionTracer) Debug(arg0, arg1 string) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Debug", arg0, arg1)
}
// Debug indicates an expected call of Debug
// Debug indicates an expected call of Debug.
func (mr *MockConnectionTracerMockRecorder) Debug(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Debug", reflect.TypeOf((*MockConnectionTracer)(nil).Debug), arg0, arg1)
}
// DroppedEncryptionLevel mocks base method
// DroppedEncryptionLevel mocks base method.
func (m *MockConnectionTracer) DroppedEncryptionLevel(arg0 protocol.EncryptionLevel) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "DroppedEncryptionLevel", arg0)
}
// DroppedEncryptionLevel indicates an expected call of DroppedEncryptionLevel
// DroppedEncryptionLevel indicates an expected call of DroppedEncryptionLevel.
func (mr *MockConnectionTracerMockRecorder) DroppedEncryptionLevel(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DroppedEncryptionLevel", reflect.TypeOf((*MockConnectionTracer)(nil).DroppedEncryptionLevel), arg0)
}
// DroppedKey mocks base method
// DroppedKey mocks base method.
func (m *MockConnectionTracer) DroppedKey(arg0 protocol.KeyPhase) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "DroppedKey", arg0)
}
// DroppedKey indicates an expected call of DroppedKey
// DroppedKey indicates an expected call of DroppedKey.
func (mr *MockConnectionTracerMockRecorder) DroppedKey(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DroppedKey", reflect.TypeOf((*MockConnectionTracer)(nil).DroppedKey), arg0)
}
// DroppedPacket mocks base method
// DroppedPacket mocks base method.
func (m *MockConnectionTracer) DroppedPacket(arg0 protocol.PacketType, arg1 protocol.ByteCount, arg2 PacketDropReason) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "DroppedPacket", arg0, arg1, arg2)
}
// DroppedPacket indicates an expected call of DroppedPacket
// DroppedPacket indicates an expected call of DroppedPacket.
func (mr *MockConnectionTracerMockRecorder) DroppedPacket(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DroppedPacket", reflect.TypeOf((*MockConnectionTracer)(nil).DroppedPacket), arg0, arg1, arg2)
}
// LossTimerCanceled mocks base method
// LossTimerCanceled mocks base method.
func (m *MockConnectionTracer) LossTimerCanceled() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "LossTimerCanceled")
}
// LossTimerCanceled indicates an expected call of LossTimerCanceled
// LossTimerCanceled indicates an expected call of LossTimerCanceled.
func (mr *MockConnectionTracerMockRecorder) LossTimerCanceled() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LossTimerCanceled", reflect.TypeOf((*MockConnectionTracer)(nil).LossTimerCanceled))
}
// LossTimerExpired mocks base method
// LossTimerExpired mocks base method.
func (m *MockConnectionTracer) LossTimerExpired(arg0 TimerType, arg1 protocol.EncryptionLevel) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "LossTimerExpired", arg0, arg1)
}
// LossTimerExpired indicates an expected call of LossTimerExpired
// LossTimerExpired indicates an expected call of LossTimerExpired.
func (mr *MockConnectionTracerMockRecorder) LossTimerExpired(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LossTimerExpired", reflect.TypeOf((*MockConnectionTracer)(nil).LossTimerExpired), arg0, arg1)
}
// LostPacket mocks base method
// LostPacket mocks base method.
func (m *MockConnectionTracer) LostPacket(arg0 protocol.EncryptionLevel, arg1 protocol.PacketNumber, arg2 PacketLossReason) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "LostPacket", arg0, arg1, arg2)
}
// LostPacket indicates an expected call of LostPacket
// LostPacket indicates an expected call of LostPacket.
func (mr *MockConnectionTracerMockRecorder) LostPacket(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LostPacket", reflect.TypeOf((*MockConnectionTracer)(nil).LostPacket), arg0, arg1, arg2)
}
// ReceivedPacket mocks base method
// ReceivedPacket mocks base method.
func (m *MockConnectionTracer) ReceivedPacket(arg0 *wire.ExtendedHeader, arg1 protocol.ByteCount, arg2 []Frame) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "ReceivedPacket", arg0, arg1, arg2)
}
// ReceivedPacket indicates an expected call of ReceivedPacket
// ReceivedPacket indicates an expected call of ReceivedPacket.
func (mr *MockConnectionTracerMockRecorder) ReceivedPacket(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReceivedPacket", reflect.TypeOf((*MockConnectionTracer)(nil).ReceivedPacket), arg0, arg1, arg2)
}
// ReceivedRetry mocks base method
// ReceivedRetry mocks base method.
func (m *MockConnectionTracer) ReceivedRetry(arg0 *wire.Header) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "ReceivedRetry", arg0)
}
// ReceivedRetry indicates an expected call of ReceivedRetry
// ReceivedRetry indicates an expected call of ReceivedRetry.
func (mr *MockConnectionTracerMockRecorder) ReceivedRetry(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReceivedRetry", reflect.TypeOf((*MockConnectionTracer)(nil).ReceivedRetry), arg0)
}
// ReceivedTransportParameters mocks base method
// ReceivedTransportParameters mocks base method.
func (m *MockConnectionTracer) ReceivedTransportParameters(arg0 *wire.TransportParameters) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "ReceivedTransportParameters", arg0)
}
// ReceivedTransportParameters indicates an expected call of ReceivedTransportParameters
// ReceivedTransportParameters indicates an expected call of ReceivedTransportParameters.
func (mr *MockConnectionTracerMockRecorder) ReceivedTransportParameters(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReceivedTransportParameters", reflect.TypeOf((*MockConnectionTracer)(nil).ReceivedTransportParameters), arg0)
}
// ReceivedVersionNegotiationPacket mocks base method
// ReceivedVersionNegotiationPacket mocks base method.
func (m *MockConnectionTracer) ReceivedVersionNegotiationPacket(arg0 *wire.Header, arg1 []protocol.VersionNumber) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "ReceivedVersionNegotiationPacket", arg0, arg1)
}
// ReceivedVersionNegotiationPacket indicates an expected call of ReceivedVersionNegotiationPacket
// ReceivedVersionNegotiationPacket indicates an expected call of ReceivedVersionNegotiationPacket.
func (mr *MockConnectionTracerMockRecorder) ReceivedVersionNegotiationPacket(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReceivedVersionNegotiationPacket", reflect.TypeOf((*MockConnectionTracer)(nil).ReceivedVersionNegotiationPacket), arg0, arg1)
}
// RestoredTransportParameters mocks base method
// RestoredTransportParameters mocks base method.
func (m *MockConnectionTracer) RestoredTransportParameters(arg0 *wire.TransportParameters) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "RestoredTransportParameters", arg0)
}
// RestoredTransportParameters indicates an expected call of RestoredTransportParameters
// RestoredTransportParameters indicates an expected call of RestoredTransportParameters.
func (mr *MockConnectionTracerMockRecorder) RestoredTransportParameters(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RestoredTransportParameters", reflect.TypeOf((*MockConnectionTracer)(nil).RestoredTransportParameters), arg0)
}
// SentPacket mocks base method
// SentPacket mocks base method.
func (m *MockConnectionTracer) SentPacket(arg0 *wire.ExtendedHeader, arg1 protocol.ByteCount, arg2 *wire.AckFrame, arg3 []Frame) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "SentPacket", arg0, arg1, arg2, arg3)
}
// SentPacket indicates an expected call of SentPacket
// SentPacket indicates an expected call of SentPacket.
func (mr *MockConnectionTracerMockRecorder) SentPacket(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SentPacket", reflect.TypeOf((*MockConnectionTracer)(nil).SentPacket), arg0, arg1, arg2, arg3)
}
// SentTransportParameters mocks base method
// SentTransportParameters mocks base method.
func (m *MockConnectionTracer) SentTransportParameters(arg0 *wire.TransportParameters) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "SentTransportParameters", arg0)
}
// SentTransportParameters indicates an expected call of SentTransportParameters
// SentTransportParameters indicates an expected call of SentTransportParameters.
func (mr *MockConnectionTracerMockRecorder) SentTransportParameters(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SentTransportParameters", reflect.TypeOf((*MockConnectionTracer)(nil).SentTransportParameters), arg0)
}
// SetLossTimer mocks base method
// SetLossTimer mocks base method.
func (m *MockConnectionTracer) SetLossTimer(arg0 TimerType, arg1 protocol.EncryptionLevel, arg2 time.Time) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "SetLossTimer", arg0, arg1, arg2)
}
// SetLossTimer indicates an expected call of SetLossTimer
// SetLossTimer indicates an expected call of SetLossTimer.
func (mr *MockConnectionTracerMockRecorder) SetLossTimer(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetLossTimer", reflect.TypeOf((*MockConnectionTracer)(nil).SetLossTimer), arg0, arg1, arg2)
}
// StartedConnection mocks base method
// StartedConnection mocks base method.
func (m *MockConnectionTracer) StartedConnection(arg0, arg1 net.Addr, arg2 protocol.VersionNumber, arg3, arg4 protocol.ConnectionID) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "StartedConnection", arg0, arg1, arg2, arg3, arg4)
}
// StartedConnection indicates an expected call of StartedConnection
// StartedConnection indicates an expected call of StartedConnection.
func (mr *MockConnectionTracerMockRecorder) StartedConnection(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartedConnection", reflect.TypeOf((*MockConnectionTracer)(nil).StartedConnection), arg0, arg1, arg2, arg3, arg4)
}
// UpdatedCongestionState mocks base method
// UpdatedCongestionState mocks base method.
func (m *MockConnectionTracer) UpdatedCongestionState(arg0 CongestionState) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "UpdatedCongestionState", arg0)
}
// UpdatedCongestionState indicates an expected call of UpdatedCongestionState
// UpdatedCongestionState indicates an expected call of UpdatedCongestionState.
func (mr *MockConnectionTracerMockRecorder) UpdatedCongestionState(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdatedCongestionState", reflect.TypeOf((*MockConnectionTracer)(nil).UpdatedCongestionState), arg0)
}
// UpdatedKey mocks base method
// UpdatedKey mocks base method.
func (m *MockConnectionTracer) UpdatedKey(arg0 protocol.KeyPhase, arg1 bool) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "UpdatedKey", arg0, arg1)
}
// UpdatedKey indicates an expected call of UpdatedKey
// UpdatedKey indicates an expected call of UpdatedKey.
func (mr *MockConnectionTracerMockRecorder) UpdatedKey(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdatedKey", reflect.TypeOf((*MockConnectionTracer)(nil).UpdatedKey), arg0, arg1)
}
// UpdatedKeyFromTLS mocks base method
// UpdatedKeyFromTLS mocks base method.
func (m *MockConnectionTracer) UpdatedKeyFromTLS(arg0 protocol.EncryptionLevel, arg1 protocol.Perspective) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "UpdatedKeyFromTLS", arg0, arg1)
}
// UpdatedKeyFromTLS indicates an expected call of UpdatedKeyFromTLS
// UpdatedKeyFromTLS indicates an expected call of UpdatedKeyFromTLS.
func (mr *MockConnectionTracerMockRecorder) UpdatedKeyFromTLS(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdatedKeyFromTLS", reflect.TypeOf((*MockConnectionTracer)(nil).UpdatedKeyFromTLS), arg0, arg1)
}
// UpdatedMetrics mocks base method
// UpdatedMetrics mocks base method.
func (m *MockConnectionTracer) UpdatedMetrics(arg0 *utils.RTTStats, arg1, arg2 protocol.ByteCount, arg3 int) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "UpdatedMetrics", arg0, arg1, arg2, arg3)
}
// UpdatedMetrics indicates an expected call of UpdatedMetrics
// UpdatedMetrics indicates an expected call of UpdatedMetrics.
func (mr *MockConnectionTracerMockRecorder) UpdatedMetrics(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdatedMetrics", reflect.TypeOf((*MockConnectionTracer)(nil).UpdatedMetrics), arg0, arg1, arg2, arg3)
}
// UpdatedPTOCount mocks base method
// UpdatedPTOCount mocks base method.
func (m *MockConnectionTracer) UpdatedPTOCount(arg0 uint32) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "UpdatedPTOCount", arg0)
}
// UpdatedPTOCount indicates an expected call of UpdatedPTOCount
// UpdatedPTOCount indicates an expected call of UpdatedPTOCount.
func (mr *MockConnectionTracerMockRecorder) UpdatedPTOCount(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdatedPTOCount", reflect.TypeOf((*MockConnectionTracer)(nil).UpdatedPTOCount), arg0)

View file

@ -13,54 +13,54 @@ import (
wire "github.com/lucas-clemente/quic-go/internal/wire"
)
// MockTracer is a mock of Tracer interface
// MockTracer is a mock of Tracer interface.
type MockTracer struct {
ctrl *gomock.Controller
recorder *MockTracerMockRecorder
}
// MockTracerMockRecorder is the mock recorder for MockTracer
// MockTracerMockRecorder is the mock recorder for MockTracer.
type MockTracerMockRecorder struct {
mock *MockTracer
}
// NewMockTracer creates a new mock instance
// NewMockTracer creates a new mock instance.
func NewMockTracer(ctrl *gomock.Controller) *MockTracer {
mock := &MockTracer{ctrl: ctrl}
mock.recorder = &MockTracerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockTracer) EXPECT() *MockTracerMockRecorder {
return m.recorder
}
// DroppedPacket mocks base method
// DroppedPacket mocks base method.
func (m *MockTracer) DroppedPacket(arg0 net.Addr, arg1 protocol.PacketType, arg2 protocol.ByteCount, arg3 PacketDropReason) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "DroppedPacket", arg0, arg1, arg2, arg3)
}
// DroppedPacket indicates an expected call of DroppedPacket
// DroppedPacket indicates an expected call of DroppedPacket.
func (mr *MockTracerMockRecorder) DroppedPacket(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DroppedPacket", reflect.TypeOf((*MockTracer)(nil).DroppedPacket), arg0, arg1, arg2, arg3)
}
// SentPacket mocks base method
// SentPacket mocks base method.
func (m *MockTracer) SentPacket(arg0 net.Addr, arg1 *wire.Header, arg2 protocol.ByteCount, arg3 []Frame) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "SentPacket", arg0, arg1, arg2, arg3)
}
// SentPacket indicates an expected call of SentPacket
// SentPacket indicates an expected call of SentPacket.
func (mr *MockTracerMockRecorder) SentPacket(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SentPacket", reflect.TypeOf((*MockTracer)(nil).SentPacket), arg0, arg1, arg2, arg3)
}
// TracerForConnection mocks base method
// TracerForConnection mocks base method.
func (m *MockTracer) TracerForConnection(arg0 protocol.Perspective, arg1 protocol.ConnectionID) ConnectionTracer {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "TracerForConnection", arg0, arg1)
@ -68,7 +68,7 @@ func (m *MockTracer) TracerForConnection(arg0 protocol.Perspective, arg1 protoco
return ret0
}
// TracerForConnection indicates an expected call of TracerForConnection
// TracerForConnection indicates an expected call of TracerForConnection.
func (mr *MockTracerMockRecorder) TracerForConnection(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TracerForConnection", reflect.TypeOf((*MockTracer)(nil).TracerForConnection), arg0, arg1)