-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate expected keeper mocks with mockgen
- Adds new makefile commands to install mockgen and to generate expected keeper mocks for use in x/rollup unit tests. - Generates expected keeper mocks for the x/rollup module
- Loading branch information
1 parent
6ca2243
commit 291f66b
Showing
2 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,6 +51,10 @@ install-go-test-coverage: | |
install-abi-gen: | ||
go install github.com/ethereum/go-ethereum/cmd/[email protected] | ||
|
||
.PHONY: install-mockgen | ||
install-mockgen: | ||
go install github.com/golang/mock/[email protected] | ||
|
||
.PHONY: install-foundry | ||
install-foundry: | ||
${SCRIPTS_PATH}/install-foundry.sh | ||
|
@@ -59,6 +63,10 @@ install-foundry: | |
gen-bindings: | ||
${SCRIPTS_PATH}/generate-bindings.sh | ||
|
||
.PHONY: gen-mocks | ||
gen-mocks: | ||
mockgen -source=x/rollup/types/expected_keepers.go -package testutil -destination x/rollup/testutil/expected_keepers_mocks.go | ||
|
||
$(COVER_OUT): | ||
go test -short ./... -coverprofile=$@ -covermode=atomic -coverpkg=./... | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.