Skip to content

Commit 8b41ffe

Browse files
tzdybalgupadhyayaGanesha Upadhyaya
authored
test: mock test of RPC (#1405)
<!-- Please read and fill out this form before submitting your PR. Please make sure you have reviewed our contributors guide before submitting your first PR. --> ## Overview This is a draft, mostly for visibility. <!-- Please provide an explanation of the PR, including the appropriate context, background, goal, and rationale. If there is an issue with this information, please provide a tl;dr and link the issue. --> ## Checklist <!-- Please complete the checklist to ensure that the PR is ready to be reviewed. IMPORTANT: PRs should be left in Draft until the below checklist is completed. --> - [ ] New and updated code has appropriate documentation - [ ] New and updated code has new and/or updated testing - [ ] Required CI checks are passing - [ ] Visual proof for any user facing features like CLI or documentation updates - [ ] Linked issues closed with keywords <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced new mock generation capabilities for testing. - **Bug Fixes** - Improved mock behavior to handle unspecified return values more robustly. - **Tests** - Expanded test coverage with new cases for subscription queries and REST endpoint behaviors. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Ganesha Upadhyaya <ganeshrvce@gmail.com> Co-authored-by: Ganesha Upadhyaya <gupadhyaya@Ganeshas-MacBook-Pro-2.local>
1 parent ff4a2d4 commit 8b41ffe

4 files changed

Lines changed: 1487 additions & 127 deletions

File tree

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,14 @@ proto-gen:
7878
./proto/gen.sh
7979
.PHONY: proto-gen
8080

81+
## mock-gen: generate mocks of external (commetbft) types
82+
mock-gen:
83+
@echo "-> Generating mocks"
84+
mockery --output test/mocks --srcpkg github.com/cometbft/cometbft/rpc/client --name Client
85+
mockery --output test/mocks --srcpkg github.com/cometbft/cometbft/abci/types --name Application
86+
.PHONY: mock-gen
87+
88+
8189
## proto-lint: Lint protobuf files. Requires docker.
8290
proto-lint:
8391
@echo "--> Linting Protobuf files"

0 commit comments

Comments
 (0)