Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: unit testing zetabridge package in zetaclient #1941

Merged
merged 27 commits into from
Apr 5, 2024
Merged

Conversation

kevinssgh
Copy link
Contributor

@kevinssgh kevinssgh commented Mar 25, 2024

Description

Improving test coverage for zetabridge query and transaction member functions.

Closes: #1918

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Include instructions and any relevant details so others can reproduce.

Test output for zetabridge:

Before

Zetabridge
ok      github.com/zeta-chain/zetacore/zetaclient/zetabridge    1.143s  coverage: 0.8% of statements

After

PASS
        github.com/zeta-chain/zetacore/zetaclient/zetabridge    coverage: 63.4% of statements
ok      github.com/zeta-chain/zetacore/zetaclient/zetabridge    11.557s

This can definitely be improved, but the main point is that the foundation for future testing is in place for this module.

  • Tested CCTX in localnet
  • Go unit tests
  • Go integration tests
  • Tested via GitHub Actions

Checklist:

  • I have added unit tests that prove my fix feature works

Copy link

codecov bot commented Mar 25, 2024

Codecov Report

Attention: Patch coverage is 92.30769% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 68.48%. Comparing base (131a774) to head (183440a).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1941      +/-   ##
===========================================
+ Coverage    65.11%   68.48%   +3.37%     
===========================================
  Files          236      236              
  Lines        13610    13617       +7     
===========================================
+ Hits          8862     9326     +464     
+ Misses        4375     3841     -534     
- Partials       373      450      +77     
Files Coverage Δ
zetaclient/config/types.go 0.00% <ø> (ø)
zetaclient/zetabridge/tx.go 52.65% <100.00%> (+50.00%) ⬆️
zetaclient/zetabridge/zetacore_bridge.go 39.07% <100.00%> (+39.07%) ⬆️
zetaclient/zetabridge/broadcast.go 58.19% <78.57%> (+58.19%) ⬆️

... and 3 files with indirect coverage changes

@kevinssgh kevinssgh marked this pull request as ready for review April 4, 2024 00:57
@kevinssgh kevinssgh requested a review from lumtis April 4, 2024 17:16
@ws4charlie
Copy link
Contributor

The mock looks nice. Left one minor comment.

Copy link
Contributor

@ws4charlie ws4charlie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@kevinssgh kevinssgh merged commit bc3a88c into develop Apr 5, 2024
21 checks passed
@kevinssgh kevinssgh deleted the zetabridge-test branch April 5, 2024 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add unit tests for zetabridge package
3 participants