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: improve crosschain module coverage #1967

Merged
merged 16 commits into from
Apr 3, 2024
Merged

Conversation

skosito
Copy link
Contributor

@skosito skosito commented Apr 1, 2024

Description

Bumps coverage to 88.68%.

Closes: #1740 #1316

Type of change

Tests

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.

  • Tested CCTX in localnet
  • Tested in development environment
  • 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 Apr 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.46%. Comparing base (64b898c) to head (daa59f3).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1967      +/-   ##
===========================================
+ Coverage    55.71%   58.46%   +2.74%     
===========================================
  Files          242      234       -8     
  Lines        13554    13392     -162     
===========================================
+ Hits          7551     7829     +278     
+ Misses        5559     5159     -400     
+ Partials       444      404      -40     
Files Coverage Δ
x/crosschain/genesis.go 100.00% <ø> (+9.30%) ⬆️
x/crosschain/keeper/cctx_utils.go 100.00% <100.00%> (+12.24%) ⬆️
.../crosschain/keeper/grpc_query_last_block_height.go 85.71% <100.00%> (+14.28%) ⬆️
x/crosschain/keeper/grpc_query_last_zeta_height.go 100.00% <100.00%> (+100.00%) ⬆️
x/crosschain/keeper/msg_server_gas_price_voter.go 100.00% <100.00%> (+100.00%) ⬆️
.../crosschain/keeper/msg_server_migrate_tss_funds.go 84.00% <100.00%> (+11.64%) ⬆️
x/crosschain/keeper/process_inbound.go 100.00% <100.00%> (+5.88%) ⬆️
x/crosschain/types/status.go 100.00% <ø> (+7.14%) ⬆️

... and 24 files with indirect coverage changes

@lumtis
Copy link
Member

lumtis commented Apr 1, 2024

Just wanted to ping: for the TSS vote message tests are implemented here: #1966

@skosito skosito closed this Apr 1, 2024
@skosito skosito reopened this Apr 1, 2024
Copy link

github-actions bot commented Apr 1, 2024

!!!WARNING!!!
nosec detected in the following files: x/crosschain/keeper/grpc_query_zeta_conversion_rate_test.go

Be very careful about using #nosec in code. It can be a quick way to suppress security warnings and move forward with development, it should be employed with caution. Suppressing warnings with #nosec can hide potentially serious vulnerabilities. Only use #nosec when you're absolutely certain that the security issue is either a false positive or has been mitigated in another way.

Only suppress a single rule (or a specific set of rules) within a section of code, while continuing to scan for other problems. To do this, you can list the rule(s) to be suppressed within the #nosec annotation, e.g: /* #nosec G401 */ or //#nosec G201 G202 G203
Broad #nosec annotations should be avoided, as they can hide other vulnerabilities. The CI will block you from merging this PR until you remove #nosec annotations that do not target specific rules.

Pay extra attention to the way #nosec is being used in the files listed above.

@github-actions github-actions bot added the nosec label Apr 1, 2024
@skosito skosito marked this pull request as ready for review April 2, 2024 15:03
@skosito skosito linked an issue Apr 2, 2024 that may be closed by this pull request
Copy link
Member

@lumtis lumtis left a comment

Choose a reason for hiding this comment

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

Looks great overall.
Wondering if we can do move coverage here https://app.codecov.io/gh/zeta-chain/node/pull/1967/blob/x/crosschain/keeper/evm_deposit.go

Copy link
Contributor

@kingpinXD kingpinXD left a comment

Choose a reason for hiding this comment

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

looks good, left some minor comments

@skosito skosito requested review from lumtis and kingpinXD April 3, 2024 15:40
@skosito skosito merged commit 09f2018 into develop Apr 3, 2024
27 checks passed
@skosito skosito deleted the test-crosschain-module branch April 3, 2024 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants