2023-09-29 18:43:26 +00:00
|
|
|
MOCKGEN ?= mockgen
|
|
|
|
MOCKS_DIR := $(CURDIR)/internal/mocks
|
2022-07-13 06:09:36 +00:00
|
|
|
|
2023-09-29 18:43:26 +00:00
|
|
|
mocks: $(MOCKS_DIR)/gen_indexer.go
|
|
|
|
.PHONY: mocks
|
2022-07-13 06:09:36 +00:00
|
|
|
|
2023-09-29 18:43:26 +00:00
|
|
|
$(MOCKS_DIR)/gen_indexer.go:
|
|
|
|
$(MOCKGEN) --package mocks --destination $@ \
|
|
|
|
--mock_names Indexer=MockgenIndexer \
|
|
|
|
github.com/cerc-io/plugeth-statediff/indexer Indexer
|
2022-05-26 10:20:42 +00:00
|
|
|
|
|
|
|
test: mocks
|
2022-06-15 07:21:26 +00:00
|
|
|
go clean -testcache && go test -p 1 -v ./...
|