Skip to content

Commit

Permalink
Add mock for OffchainClient from deployment (#15580)
Browse files Browse the repository at this point in the history
* Adds mock for `OffchainClient` from `deployment`

* Updates mockery files

* Runs mockery and all dirs with a `.mockery.yaml` file
  • Loading branch information
vyzaldysanchez authored Dec 18, 2024
1 parent 86bf8bd commit b246e25
Show file tree
Hide file tree
Showing 3 changed files with 1,389 additions and 1 deletion.
2 changes: 1 addition & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ abigen: ## Build & install abigen.
.PHONY: generate
generate: abigen codecgen mockery protoc gomods ## Execute all go:generate commands.
gomods -w go generate -x ./...
mockery
find . -type f -name .mockery.yaml -execdir mockery \; ## Execute mockery for all .mockery.yaml files

.PHONY: rm-mocked
rm-mocked:
Expand Down
13 changes: 13 additions & 0 deletions deployment/.mockery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
dir: "{{ .InterfaceDir }}/mocks"
mockname: "{{ .InterfaceName }}"
outpkg: mocks
filename: "{{ .InterfaceName | snakecase }}.go"
packages:
github.com/smartcontractkit/chainlink/deployment:
interfaces:
OffchainClient:
config:
mockname: "Mock{{ .InterfaceName }}"
filename: offchain_client_mock.go
inpackage: true
dir: "{{ .InterfaceDir }}/mocks"
Loading

0 comments on commit b246e25

Please sign in to comment.