Skip to content

Commit

Permalink
rm generated mock files to ensure they regenerate (#13591)
Browse files Browse the repository at this point in the history
* rm generated mock files to ensure they regenerate

* rm unused mocks; fix generation
  • Loading branch information
jmank88 authored Jul 17, 2024
1 parent ce7d99a commit 5cfab4f
Show file tree
Hide file tree
Showing 9 changed files with 255 additions and 239 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,9 @@ jobs:
run: curl https://github.com/smartcontractkit/wsrpc/raw/main/cmd/protoc-gen-go-wsrpc/protoc-gen-go-wsrpc --output $HOME/go/bin/protoc-gen-go-wsrpc && chmod +x $HOME/go/bin/protoc-gen-go-wsrpc
- name: Setup NodeJS
uses: ./.github/actions/setup-nodejs
- run: make generate # generate install go deps
- run: |
make rm-mocked
make generate
- name: Ensure clean after generate
run: git diff --stat --exit-code
- run: make gomodtidy
Expand Down
6 changes: 5 additions & 1 deletion .mockery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ packages:
interfaces:
Node:
NodeSelector:
SendOnlyClient:
sendOnlyClient:
SendOnlyNode:
RPC:
Head:
Expand Down Expand Up @@ -163,6 +163,10 @@ packages:
ConnectionsManager:
ORM:
Service:
github.com/smartcontractkit/chainlink/v2/core/services/feeds/proto:
config:
dir: "{{ .InterfaceDir }}/../mocks"
interfaces:
FeedsManagerClient:
github.com/smartcontractkit/chainlink/v2/core/services/fluxmonitorv2:
interfaces:
Expand Down
4 changes: 4 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ generate: abigen codecgen mockery protoc ## Execute all go:generate commands.
cd ./dashboard-lib && go generate -x ./...
mockery

.PHONY: rm-mocked
rm-mocked:
grep -rl "^// Code generated by mockery" | grep .go$ | xargs -r rm

.PHONY: testscripts
testscripts: chainlink-test ## Install and run testscript against testdata/scripts/* files.
go install github.com/rogpeppe/go-internal/cmd/testscript@latest
Expand Down
90 changes: 90 additions & 0 deletions common/client/mock_send_only_client_test.go

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

47 changes: 0 additions & 47 deletions core/chains/evm/client/mocks/batch_sender.go

This file was deleted.

80 changes: 0 additions & 80 deletions core/chains/evm/client/mocks/tx_sender.go

This file was deleted.

61 changes: 0 additions & 61 deletions core/chains/evm/gas/mocks/eth_client.go

This file was deleted.

49 changes: 0 additions & 49 deletions core/chains/evm/gas/mocks/rpc_client.go

This file was deleted.

Loading

0 comments on commit 5cfab4f

Please sign in to comment.