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

@ -13,42 +13,42 @@ import (
qtls "github.com/lucas-clemente/quic-go/internal/qtls"
)
// MockCryptoSetup is a mock of CryptoSetup interface
// MockCryptoSetup is a mock of CryptoSetup interface.
type MockCryptoSetup struct {
ctrl *gomock.Controller
recorder *MockCryptoSetupMockRecorder
}
// MockCryptoSetupMockRecorder is the mock recorder for MockCryptoSetup
// MockCryptoSetupMockRecorder is the mock recorder for MockCryptoSetup.
type MockCryptoSetupMockRecorder struct {
mock *MockCryptoSetup
}
// NewMockCryptoSetup creates a new mock instance
// NewMockCryptoSetup creates a new mock instance.
func NewMockCryptoSetup(ctrl *gomock.Controller) *MockCryptoSetup {
mock := &MockCryptoSetup{ctrl: ctrl}
mock.recorder = &MockCryptoSetupMockRecorder{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 *MockCryptoSetup) EXPECT() *MockCryptoSetupMockRecorder {
return m.recorder
}
// ChangeConnectionID mocks base method
// ChangeConnectionID mocks base method.
func (m *MockCryptoSetup) ChangeConnectionID(arg0 protocol.ConnectionID) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "ChangeConnectionID", arg0)
}
// ChangeConnectionID indicates an expected call of ChangeConnectionID
// ChangeConnectionID indicates an expected call of ChangeConnectionID.
func (mr *MockCryptoSetupMockRecorder) ChangeConnectionID(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeConnectionID", reflect.TypeOf((*MockCryptoSetup)(nil).ChangeConnectionID), arg0)
}
// Close mocks base method
// Close mocks base method.
func (m *MockCryptoSetup) Close() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Close")
@ -56,13 +56,13 @@ func (m *MockCryptoSetup) Close() error {
return ret0
}
// Close indicates an expected call of Close
// Close indicates an expected call of Close.
func (mr *MockCryptoSetupMockRecorder) Close() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockCryptoSetup)(nil).Close))
}
// ConnectionState mocks base method
// ConnectionState mocks base method.
func (m *MockCryptoSetup) ConnectionState() qtls.ConnectionState {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ConnectionState")
@ -70,13 +70,13 @@ func (m *MockCryptoSetup) ConnectionState() qtls.ConnectionState {
return ret0
}
// ConnectionState indicates an expected call of ConnectionState
// ConnectionState indicates an expected call of ConnectionState.
func (mr *MockCryptoSetupMockRecorder) ConnectionState() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectionState", reflect.TypeOf((*MockCryptoSetup)(nil).ConnectionState))
}
// Get0RTTOpener mocks base method
// Get0RTTOpener mocks base method.
func (m *MockCryptoSetup) Get0RTTOpener() (handshake.LongHeaderOpener, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Get0RTTOpener")
@ -85,13 +85,13 @@ func (m *MockCryptoSetup) Get0RTTOpener() (handshake.LongHeaderOpener, error) {
return ret0, ret1
}
// Get0RTTOpener indicates an expected call of Get0RTTOpener
// Get0RTTOpener indicates an expected call of Get0RTTOpener.
func (mr *MockCryptoSetupMockRecorder) Get0RTTOpener() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get0RTTOpener", reflect.TypeOf((*MockCryptoSetup)(nil).Get0RTTOpener))
}
// Get0RTTSealer mocks base method
// Get0RTTSealer mocks base method.
func (m *MockCryptoSetup) Get0RTTSealer() (handshake.LongHeaderSealer, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Get0RTTSealer")
@ -100,13 +100,13 @@ func (m *MockCryptoSetup) Get0RTTSealer() (handshake.LongHeaderSealer, error) {
return ret0, ret1
}
// Get0RTTSealer indicates an expected call of Get0RTTSealer
// Get0RTTSealer indicates an expected call of Get0RTTSealer.
func (mr *MockCryptoSetupMockRecorder) Get0RTTSealer() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get0RTTSealer", reflect.TypeOf((*MockCryptoSetup)(nil).Get0RTTSealer))
}
// Get1RTTOpener mocks base method
// Get1RTTOpener mocks base method.
func (m *MockCryptoSetup) Get1RTTOpener() (handshake.ShortHeaderOpener, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Get1RTTOpener")
@ -115,13 +115,13 @@ func (m *MockCryptoSetup) Get1RTTOpener() (handshake.ShortHeaderOpener, error) {
return ret0, ret1
}
// Get1RTTOpener indicates an expected call of Get1RTTOpener
// Get1RTTOpener indicates an expected call of Get1RTTOpener.
func (mr *MockCryptoSetupMockRecorder) Get1RTTOpener() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get1RTTOpener", reflect.TypeOf((*MockCryptoSetup)(nil).Get1RTTOpener))
}
// Get1RTTSealer mocks base method
// Get1RTTSealer mocks base method.
func (m *MockCryptoSetup) Get1RTTSealer() (handshake.ShortHeaderSealer, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Get1RTTSealer")
@ -130,13 +130,13 @@ func (m *MockCryptoSetup) Get1RTTSealer() (handshake.ShortHeaderSealer, error) {
return ret0, ret1
}
// Get1RTTSealer indicates an expected call of Get1RTTSealer
// Get1RTTSealer indicates an expected call of Get1RTTSealer.
func (mr *MockCryptoSetupMockRecorder) Get1RTTSealer() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get1RTTSealer", reflect.TypeOf((*MockCryptoSetup)(nil).Get1RTTSealer))
}
// GetHandshakeOpener mocks base method
// GetHandshakeOpener mocks base method.
func (m *MockCryptoSetup) GetHandshakeOpener() (handshake.LongHeaderOpener, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetHandshakeOpener")
@ -145,13 +145,13 @@ func (m *MockCryptoSetup) GetHandshakeOpener() (handshake.LongHeaderOpener, erro
return ret0, ret1
}
// GetHandshakeOpener indicates an expected call of GetHandshakeOpener
// GetHandshakeOpener indicates an expected call of GetHandshakeOpener.
func (mr *MockCryptoSetupMockRecorder) GetHandshakeOpener() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetHandshakeOpener", reflect.TypeOf((*MockCryptoSetup)(nil).GetHandshakeOpener))
}
// GetHandshakeSealer mocks base method
// GetHandshakeSealer mocks base method.
func (m *MockCryptoSetup) GetHandshakeSealer() (handshake.LongHeaderSealer, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetHandshakeSealer")
@ -160,13 +160,13 @@ func (m *MockCryptoSetup) GetHandshakeSealer() (handshake.LongHeaderSealer, erro
return ret0, ret1
}
// GetHandshakeSealer indicates an expected call of GetHandshakeSealer
// GetHandshakeSealer indicates an expected call of GetHandshakeSealer.
func (mr *MockCryptoSetupMockRecorder) GetHandshakeSealer() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetHandshakeSealer", reflect.TypeOf((*MockCryptoSetup)(nil).GetHandshakeSealer))
}
// GetInitialOpener mocks base method
// GetInitialOpener mocks base method.
func (m *MockCryptoSetup) GetInitialOpener() (handshake.LongHeaderOpener, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetInitialOpener")
@ -175,13 +175,13 @@ func (m *MockCryptoSetup) GetInitialOpener() (handshake.LongHeaderOpener, error)
return ret0, ret1
}
// GetInitialOpener indicates an expected call of GetInitialOpener
// GetInitialOpener indicates an expected call of GetInitialOpener.
func (mr *MockCryptoSetupMockRecorder) GetInitialOpener() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInitialOpener", reflect.TypeOf((*MockCryptoSetup)(nil).GetInitialOpener))
}
// GetInitialSealer mocks base method
// GetInitialSealer mocks base method.
func (m *MockCryptoSetup) GetInitialSealer() (handshake.LongHeaderSealer, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetInitialSealer")
@ -190,13 +190,13 @@ func (m *MockCryptoSetup) GetInitialSealer() (handshake.LongHeaderSealer, error)
return ret0, ret1
}
// GetInitialSealer indicates an expected call of GetInitialSealer
// GetInitialSealer indicates an expected call of GetInitialSealer.
func (mr *MockCryptoSetupMockRecorder) GetInitialSealer() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInitialSealer", reflect.TypeOf((*MockCryptoSetup)(nil).GetInitialSealer))
}
// GetSessionTicket mocks base method
// GetSessionTicket mocks base method.
func (m *MockCryptoSetup) GetSessionTicket() ([]byte, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetSessionTicket")
@ -205,13 +205,13 @@ func (m *MockCryptoSetup) GetSessionTicket() ([]byte, error) {
return ret0, ret1
}
// GetSessionTicket indicates an expected call of GetSessionTicket
// GetSessionTicket indicates an expected call of GetSessionTicket.
func (mr *MockCryptoSetupMockRecorder) GetSessionTicket() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSessionTicket", reflect.TypeOf((*MockCryptoSetup)(nil).GetSessionTicket))
}
// HandleMessage mocks base method
// HandleMessage mocks base method.
func (m *MockCryptoSetup) HandleMessage(arg0 []byte, arg1 protocol.EncryptionLevel) bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "HandleMessage", arg0, arg1)
@ -219,37 +219,37 @@ func (m *MockCryptoSetup) HandleMessage(arg0 []byte, arg1 protocol.EncryptionLev
return ret0
}
// HandleMessage indicates an expected call of HandleMessage
// HandleMessage indicates an expected call of HandleMessage.
func (mr *MockCryptoSetupMockRecorder) HandleMessage(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleMessage", reflect.TypeOf((*MockCryptoSetup)(nil).HandleMessage), arg0, arg1)
}
// RunHandshake mocks base method
// RunHandshake mocks base method.
func (m *MockCryptoSetup) RunHandshake() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "RunHandshake")
}
// RunHandshake indicates an expected call of RunHandshake
// RunHandshake indicates an expected call of RunHandshake.
func (mr *MockCryptoSetupMockRecorder) RunHandshake() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunHandshake", reflect.TypeOf((*MockCryptoSetup)(nil).RunHandshake))
}
// SetHandshakeConfirmed mocks base method
// SetHandshakeConfirmed mocks base method.
func (m *MockCryptoSetup) SetHandshakeConfirmed() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "SetHandshakeConfirmed")
}
// SetHandshakeConfirmed indicates an expected call of SetHandshakeConfirmed
// SetHandshakeConfirmed indicates an expected call of SetHandshakeConfirmed.
func (mr *MockCryptoSetupMockRecorder) SetHandshakeConfirmed() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetHandshakeConfirmed", reflect.TypeOf((*MockCryptoSetup)(nil).SetHandshakeConfirmed))
}
// SetLargest1RTTAcked mocks base method
// SetLargest1RTTAcked mocks base method.
func (m *MockCryptoSetup) SetLargest1RTTAcked(arg0 protocol.PacketNumber) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetLargest1RTTAcked", arg0)
@ -257,7 +257,7 @@ func (m *MockCryptoSetup) SetLargest1RTTAcked(arg0 protocol.PacketNumber) error
return ret0
}
// SetLargest1RTTAcked indicates an expected call of SetLargest1RTTAcked
// SetLargest1RTTAcked indicates an expected call of SetLargest1RTTAcked.
func (mr *MockCryptoSetupMockRecorder) SetLargest1RTTAcked(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetLargest1RTTAcked", reflect.TypeOf((*MockCryptoSetup)(nil).SetLargest1RTTAcked), arg0)