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

fix: move btc std memo tests to advanced tests #3049

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

skosito
Copy link
Contributor

@skosito skosito commented Oct 28, 2024

Description

Move bitcoin std tests to advanced so they are not run before upgrade

How Has This Been Tested?

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

Summary by CodeRabbit

  • Bug Fixes

    • Restructured test cases for Bitcoin memo deposits, improving organization and clarity in testing processes.
  • Documentation

    • Updated comments for enhanced clarity on the purpose of code sections.

@skosito skosito added no-changelog Skip changelog CI check UPGRADE_TESTS Run make start-upgrade-tests UPGRADE_IMPORT_MAINNET_TESTS Run make start-upgrade-import-mainnet-test labels Oct 28, 2024
Copy link
Contributor

coderabbitai bot commented Oct 28, 2024

📝 Walkthrough

Walkthrough

The pull request modifies the local.go file, particularly the localE2ETest function. It reorganizes test cases by removing four Bitcoin standard memo deposit tests from the bitcoinTests slice and reinserting them into the bitcoinAdvancedTests slice. The overall structure of the localE2ETest function remains unchanged, preserving its parameters and logic for managing test execution, setups, and error handling. Minor comment adjustments are made for clarity, but no new functionality is introduced.

Changes

File Path Change Summary
cmd/zetae2e/local/local.go - Removed four Bitcoin standard memo deposit test cases from bitcoinTests slice.
- Added the removed test cases back into the bitcoinAdvancedTests slice.
- Minor comment adjustments for clarity.

Possibly related PRs

Suggested reviewers

  • fbac
  • kingpinXD
  • swift1337
  • ws4charlie
  • brewmaster012
  • lumtis

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@skosito skosito changed the title fix: move btc std tests to advanced tests fix: move btc std memo tests to advanced tests Oct 28, 2024
Copy link
Contributor

@swift1337 swift1337 left a comment

Choose a reason for hiding this comment

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

Why would we move standard tests to the advanced tests category?

@skosito
Copy link
Contributor Author

skosito commented Oct 28, 2024

Why would we move standard tests to the advanced tests category?

check PR description, so they are not run before upgrade as it makes upgrade tests failing

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (1)
cmd/zetae2e/local/local.go (1)

Line range hint 1-577: Consider refactoring the test setup and execution logic.

The localE2ETest function is quite large and handles multiple responsibilities. Consider breaking it down into smaller, focused functions for better maintainability:

  1. Test configuration setup
  2. Network setup
  3. Test suite organization
  4. Test execution orchestration

Example refactor for test suite organization:

type TestSuite struct {
    Basic    []string
    Advanced []string
}

func newBitcoinTestSuite() TestSuite {
    return TestSuite{
        Basic: []string{
            e2etests.TestBitcoinDonationName,
            e2etests.TestBitcoinDepositName,
            // ... other basic tests
        },
        Advanced: []string{
            e2etests.TestBitcoinWithdrawTaprootName,
            e2etests.TestBitcoinStdMemoDepositName,
            // ... other advanced tests
        },
    }
}

func (s TestSuite) All() []string {
    return append(s.Basic, s.Advanced...)
}

This would make the test organization more maintainable and easier to modify in the future.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 4c8c926 and cfd51de.

📒 Files selected for processing (1)
  • cmd/zetae2e/local/local.go (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
cmd/zetae2e/local/local.go (1)

Pattern **/*.go: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.

🔇 Additional comments (1)
cmd/zetae2e/local/local.go (1)

317-320: LGTM: Bitcoin standard memo deposit tests correctly moved to advanced tests.

The relocation of these tests aligns with the PR objective and ensures they won't be executed before an upgrade.

cmd/zetae2e/local/local.go Show resolved Hide resolved
@lumtis lumtis changed the base branch from develop to release/v21 October 28, 2024 12:12
cmd/zetae2e/local/local.go Show resolved Hide resolved
@lumtis lumtis enabled auto-merge (squash) October 28, 2024 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking:cli no-changelog Skip changelog CI check UPGRADE_IMPORT_MAINNET_TESTS Run make start-upgrade-import-mainnet-test UPGRADE_TESTS Run make start-upgrade-tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants