mirror of https://github.com/certusone/dc4bc.git
feat: more client tests
This commit is contained in:
parent
0037421ff0
commit
2572c51bf7
|
@ -79,7 +79,8 @@ func TestClient_ProcessMessage(t *testing.T) {
|
|||
DkgPubKey: make([]byte, 128),
|
||||
},
|
||||
},
|
||||
CreatedAt: time.Now(),
|
||||
CreatedAt: time.Now(),
|
||||
SigningThreshold: 2,
|
||||
}
|
||||
messageDataBz, err := json.Marshal(messageData)
|
||||
req.NoError(err)
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
// Code generated by MockGen. DO NOT EDIT.
|
||||
// Source: ./../client/keystore.go
|
||||
|
||||
// Package clientMocks is a generated GoMock package.
|
||||
package clientMocks
|
||||
|
||||
import (
|
||||
client "github.com/depools/dc4bc/client"
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
reflect "reflect"
|
||||
)
|
||||
|
||||
// MockKeyStore is a mock of KeyStore interface
|
||||
type MockKeyStore struct {
|
||||
ctrl *gomock.Controller
|
||||
recorder *MockKeyStoreMockRecorder
|
||||
}
|
||||
|
||||
// MockKeyStoreMockRecorder is the mock recorder for MockKeyStore
|
||||
type MockKeyStoreMockRecorder struct {
|
||||
mock *MockKeyStore
|
||||
}
|
||||
|
||||
// NewMockKeyStore creates a new mock instance
|
||||
func NewMockKeyStore(ctrl *gomock.Controller) *MockKeyStore {
|
||||
mock := &MockKeyStore{ctrl: ctrl}
|
||||
mock.recorder = &MockKeyStoreMockRecorder{mock}
|
||||
return mock
|
||||
}
|
||||
|
||||
// EXPECT returns an object that allows the caller to indicate expected use
|
||||
func (m *MockKeyStore) EXPECT() *MockKeyStoreMockRecorder {
|
||||
return m.recorder
|
||||
}
|
||||
|
||||
// LoadKeys mocks base method
|
||||
func (m *MockKeyStore) LoadKeys(userName, password string) (*client.KeyPair, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "LoadKeys", userName, password)
|
||||
ret0, _ := ret[0].(*client.KeyPair)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// LoadKeys indicates an expected call of LoadKeys
|
||||
func (mr *MockKeyStoreMockRecorder) LoadKeys(userName, password interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoadKeys", reflect.TypeOf((*MockKeyStore)(nil).LoadKeys), userName, password)
|
||||
}
|
Loading…
Reference in New Issue