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(e2e): TestBitcoinDepositRefund, WithdrawBitcoinMultipleTimes #2349

Merged
merged 22 commits into from
Jun 20, 2024

Conversation

swift1337
Copy link
Contributor

@swift1337 swift1337 commented Jun 18, 2024

Description

This PR adds E2E tests for TestBitcoinDepositRefund and WithdrawBitcoinMultipleTimes. It also introduces several improvements to testing suite:

  • Support for testify's assert and require packages in e2e testing
  • Support for debugging e2e test using Delve debugger ./e2e/scripts/debug.sh $test $args
  • Shortcut for running a single e2e test ./e2e/scripts/run.sh $test $args
  • Support for utils.WaitCctxByInboundHash() with some handy filters

Closes: #1469

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

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

@swift1337 swift1337 self-assigned this Jun 18, 2024
e2e/e2etests/e2etests.go Outdated Show resolved Hide resolved
e2e/e2etests/e2etests.go Outdated Show resolved Hide resolved
e2e/e2etests/e2etests.go Outdated Show resolved Hide resolved
e2e/e2etests/test_bitcoin_deposit_refund.go Outdated Show resolved Hide resolved
@swift1337 swift1337 changed the title test(e2e): DepositBTCRefund, WithdrawBitcoinMultipleTimes test(e2e): TestBitcoinDepositRefund, WithdrawBitcoinMultipleTimes Jun 19, 2024
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.

We'll need to add the new test in cmd/zetae2e/local/local.go to execute in CI

@swift1337 swift1337 marked this pull request as ready for review June 19, 2024 16:17
@github-actions github-actions bot added the nosec label Jun 19, 2024
@zeta-chain zeta-chain deleted a comment from github-actions bot Jun 19, 2024
@swift1337 swift1337 removed the nosec label Jun 19, 2024
e2e/README.md Outdated Show resolved Hide resolved
e2e/e2etests/helper_bitcoin.go Outdated Show resolved Hide resolved
e2e/e2etests/test_bitcoin_deposit_refund.go Show resolved Hide resolved
e2e/e2etests/helper_bitcoin.go Outdated Show resolved Hide resolved
e2e/e2etests/test_bitcoin_deposit_refund.go Show resolved Hide resolved
e2e/e2etests/test_bitcoin_deposit_refund.go Outdated Show resolved Hide resolved
e2e/e2etests/test_bitcoin_deposit_refund.go Show resolved Hide resolved
e2e/e2etests/test_bitcoin_deposit_refund.go Outdated Show resolved Hide resolved
@github-actions github-actions bot added the nosec label Jun 20, 2024
@zeta-chain zeta-chain deleted a comment from github-actions bot Jun 20, 2024
@zeta-chain zeta-chain deleted a comment from github-actions bot Jun 20, 2024
@zeta-chain zeta-chain deleted a comment from github-actions bot Jun 20, 2024
@zeta-chain zeta-chain deleted a comment from gitguardian bot Jun 20, 2024
@lumtis
Copy link
Member

lumtis commented Jun 20, 2024

Need to run

make generate

Note: don't be surprised, this command takes 2 min because we run formatter in the entire codebase (we might want to find some optimization on this)

@zeta-chain zeta-chain deleted a comment from gitguardian bot Jun 20, 2024
@zeta-chain zeta-chain deleted a comment from github-actions bot Jun 20, 2024
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.

👍

Copy link
Contributor

@skosito skosito 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 comments, please check before merge if they make sense

e2e/runner/runner.go Show resolved Hide resolved
e2e/runner/bitcoin.go Show resolved Hide resolved
e2e/e2etests/helpers.go Show resolved Hide resolved
e2e/e2etests/helpers.go Outdated Show resolved Hide resolved
e2e/scripts/debug.sh Outdated Show resolved Hide resolved
e2e/scripts/run.sh Show resolved Hide resolved
e2e/utils/zetacore.go Show resolved Hide resolved
go.mod Show resolved Hide resolved
@zeta-chain zeta-chain deleted a comment from gitguardian bot Jun 20, 2024
@zeta-chain zeta-chain deleted a comment from github-actions bot Jun 20, 2024
@swift1337 swift1337 merged commit 5e3c3ba into develop Jun 20, 2024
18 of 19 checks passed
@swift1337 swift1337 deleted the test/deposit-btc-refund branch June 20, 2024 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement E2E test for DepositBTCRefund
4 participants