Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

use moq generated mock #97

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pkg/middleware/account_uuid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ func TestAccountUUIDMiddlewareWithDisabledAccount(t *testing.T) {

func mockAccountUUIDMiddlewareAccSvc(retErr, accEnabled bool) proto.AccountsService {
if retErr {
return &proto.MockAccountsService{
ListFunc: func(ctx context.Context, in *proto.ListAccountsRequest, opts ...client.CallOption) (out *proto.ListAccountsResponse, err error) {
return &proto.AccountsServiceMock{
ListAccountsFunc: func(ctx context.Context, in *proto.ListAccountsRequest, opts ...client.CallOption) (out *proto.ListAccountsResponse, err error) {
return nil, fmt.Errorf("error returned by mockAccountsService LIST")
},
}
}

return &proto.MockAccountsService{
ListFunc: func(ctx context.Context, in *proto.ListAccountsRequest, opts ...client.CallOption) (out *proto.ListAccountsResponse, err error) {
return &proto.AccountsServiceMock{
ListAccountsFunc: func(ctx context.Context, in *proto.ListAccountsRequest, opts ...client.CallOption) (out *proto.ListAccountsResponse, err error) {
return &proto.ListAccountsResponse{
Accounts: []*proto.Account{
{
Expand Down