update github.com/didip/tollbooth from v6 to v7

This commit is contained in:
Dmitry Verkhoturov
2024-05-09 02:04:46 +02:00
committed by Umputun
parent d9085e7dcc
commit 0a9e489743
26 changed files with 249 additions and 292 deletions

View File

@@ -13,19 +13,19 @@ var _ RPCClient = &RPCClientMock{}
// RPCClientMock is a mock implementation of RPCClient.
//
// func TestSomethingThatUsesRPCClient(t *testing.T) {
// func TestSomethingThatUsesRPCClient(t *testing.T) {
//
// // make and configure a mocked RPCClient
// mockedRPCClient := &RPCClientMock{
// CallFunc: func(serviceMethod string, args interface{}, reply interface{}) error {
// panic("mock out the Call method")
// },
// }
// // make and configure a mocked RPCClient
// mockedRPCClient := &RPCClientMock{
// CallFunc: func(serviceMethod string, args interface{}, reply interface{}) error {
// panic("mock out the Call method")
// },
// }
//
// // use mockedRPCClient in code that requires RPCClient
// // and then make assertions.
// // use mockedRPCClient in code that requires RPCClient
// // and then make assertions.
//
// }
// }
type RPCClientMock struct {
// CallFunc mocks the Call method.
CallFunc func(serviceMethod string, args interface{}, reply interface{}) error
@@ -67,7 +67,8 @@ func (mock *RPCClientMock) Call(serviceMethod string, args interface{}, reply in
// CallCalls gets all the calls that were made to Call.
// Check the length with:
// len(mockedRPCClient.CallCalls())
//
// len(mockedRPCClient.CallCalls())
func (mock *RPCClientMock) CallCalls() []struct {
ServiceMethod string
Args interface{}

View File

@@ -13,19 +13,19 @@ var _ RPCDialer = &RPCDialerMock{}
// RPCDialerMock is a mock implementation of RPCDialer.
//
// func TestSomethingThatUsesRPCDialer(t *testing.T) {
// func TestSomethingThatUsesRPCDialer(t *testing.T) {
//
// // make and configure a mocked RPCDialer
// mockedRPCDialer := &RPCDialerMock{
// DialFunc: func(network string, address string) (RPCClient, error) {
// panic("mock out the Dial method")
// },
// }
// // make and configure a mocked RPCDialer
// mockedRPCDialer := &RPCDialerMock{
// DialFunc: func(network string, address string) (RPCClient, error) {
// panic("mock out the Dial method")
// },
// }
//
// // use mockedRPCDialer in code that requires RPCDialer
// // and then make assertions.
// // use mockedRPCDialer in code that requires RPCDialer
// // and then make assertions.
//
// }
// }
type RPCDialerMock struct {
// DialFunc mocks the Dial method.
DialFunc func(network string, address string) (RPCClient, error)
@@ -63,7 +63,8 @@ func (mock *RPCDialerMock) Dial(network string, address string) (RPCClient, erro
// DialCalls gets all the calls that were made to Dial.
// Check the length with:
// len(mockedRPCDialer.DialCalls())
//
// len(mockedRPCDialer.DialCalls())
func (mock *RPCDialerMock) DialCalls() []struct {
Network string
Address string