Skip to content

test: improve fungible module coverage#1762

Merged
lumtis merged 12 commits intodevelopfrom
chore-improve-fungible-module-coverage
Feb 19, 2024
Merged

test: improve fungible module coverage#1762
lumtis merged 12 commits intodevelopfrom
chore-improve-fungible-module-coverage

Conversation

@skosito
Copy link
Member

@skosito skosito commented Feb 15, 2024

Description

Increases the coverage of mentioned parts of fungible module. Adds some generic helper methods for mocking evm client. I think there is a bit more room to move some testing code around (for example deploySystemContract) and probably it's better to mock happy paths too. Here I basically had to introduce more evm client mocking because it is hard to mimic real world evmCall reverts (and no need to in unit tests, we can mock that external dependency).

Relates to: #1742 . It is part 1 of adding more coverage, will add missing tests for system_contract.go in follow up PR.

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
Contributor

@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!

@skosito skosito requested a review from lumtis February 16, 2024 11:36
Copy link
Contributor

@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.

Great job!
The coverage looks good to me. We're integrating code coverage so will check the global coverage afterward.

@lumtis lumtis merged commit e72da59 into develop Feb 19, 2024
@lumtis lumtis deleted the chore-improve-fungible-module-coverage branch February 19, 2024 14:32
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.

3 participants