Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Adjust mockery config #50

Merged
merged 1 commit into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
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
36 changes: 36 additions & 0 deletions .mockery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
with-expecter: true
dir: "mocks"
rachit77 marked this conversation as resolved.
Show resolved Hide resolved
filename: "{{.InterfaceName | lower }}.generated.go"
mockname: "{{.InterfaceName}}"
outpkg: "mocks"
packages:
github.com/0xPolygon/beethoven/etherman:
config:
interfaces:
IEthereumClient:
config:
mockname: EthereumClientMock
filename: etherman_client.generated.go
github.com/0xPolygon/beethoven/types:
config:
interfaces:
IDB:
config:
mockname: DBMock
filename: db.generated.go
IEtherman:
config:
mockname: EthermanMock
filename: etherman.generated.go
IEthTxManager:
config:
mockname: EthTxManagerMock
filename: eth_tx_manager.generated.go
IZkEVMClient:
config:
mockname: ZkEVMClientMock
filename: zk_evm_client.generated.go
IZkEVMClientClientCreator:
config:
mockname: ZkEVMClientClientCreatorMock
filename: zk_evm_client_creator.generated.go
3 changes: 1 addition & 2 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ import (
"time"

"github.com/0xPolygon/beethoven/rpc/types"
"github.com/0xPolygon/beethoven/tx"
"github.com/0xPolygonHermez/zkevm-node/ethtxmanager"
"github.com/0xPolygonHermez/zkevm-node/jsonrpc/client"
"github.com/ethereum/go-ethereum/common"

"github.com/0xPolygon/beethoven/tx"
)

// ClientFactoryInterface interface for the client factory
Expand Down
1 change: 0 additions & 1 deletion etherman/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"github.com/ethereum/go-ethereum/accounts/abi/bind"
)

//go:generate mockery --name IEthereumClient --structname EthereumClientMock --output ../mocks --case=underscore --filename etherman_client.generated.go
type IEthereumClient interface {
ethereum.ChainReader
ethereum.ChainStateReader
Expand Down
36 changes: 36 additions & 0 deletions mocks/db.generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

137 changes: 137 additions & 0 deletions mocks/eth_tx_manager.generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading