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

[Testing] chore: uncomment proof CLI query tests #668

Merged
merged 2 commits into from
Jul 12, 2024

Conversation

bryanchriswhite
Copy link
Contributor

@bryanchriswhite bryanchriswhite commented Jul 9, 2024

Summary

Restore proof CLI query tests.

Issue

Type of change

Select one or more:

  • New feature, functionality or library
  • Bug fix
  • Code health or cleanup
  • Documentation
  • Other (specify)

Testing

Documentation changes (only if making doc changes)

  • make docusaurus_start; only needed if you make doc changes

Local Testing (only if making code changes)

  • Unit Tests: make go_develop_and_test
  • LocalNet E2E Tests: make test_e2e
  • See quickstart guide for instructions

PR Testing (only if making code changes)

  • DevNet E2E Tests: Add the devnet-test-e2e label to the PR.
    • THIS IS VERY EXPENSIVE, so only do it after all the reviews are complete.
    • Optionally run make trigger_ci if you want to re-trigger tests without any code changes
    • If tests fail, try re-running failed tests only using the GitHub UI as shown here

Sanity Checklist

  • I have tested my changes using the available tooling
  • I have commented my code
  • I have performed a self-review of my own code; both comments & source code
  • I create and reference any new tickets, if applicable
  • I have left TODOs throughout the codebase, if applicable

Summary by CodeRabbit

  • Tests
    • Enhanced test cases for proof module to include additional fields and arguments, improving accuracy and coverage.

@bryanchriswhite bryanchriswhite added the testing Test (or test utils) additions, fixes, improvements or other label Jul 9, 2024
@bryanchriswhite bryanchriswhite self-assigned this Jul 9, 2024
Copy link

coderabbitai bot commented Jul 9, 2024

Walkthrough

The modifications in x/proof/module/query_proof_test.go focus on enhancing the test functions TestShowProof and TestListProof. These changes include updating import statements, initializing Proof objects with additional fields, and adjusting test cases to reflect these updates. This ensures comprehensive testing of the enhanced Proof objects and functionality.

Changes

File Change Summary
x/proof/module/query_proof_test.go Updated import statements, initialized Proof objects with extra fields, and modified test cases.

Poem

In code we trust, with proofs we play,
Enhanced tests light our way.
Assertions clear, responses right,
In the realm of bugs, we fight.
🐇✨ Coding magic through the night!


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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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.

@bryanchriswhite bryanchriswhite marked this pull request as ready for review July 9, 2024 12:17
Copy link

@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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between bdbc365 and 9d447a9.

Files selected for processing (1)
  • x/proof/module/query_proof_test.go (1 hunks)
Additional comments not posted (4)
x/proof/module/query_proof_test.go (4)

3-20: Imports look good!

The new imports are necessary for the added functionality in the test functions.


22-43: Initialization of Proof objects looks correct.

The Proof objects are initialized with additional fields, which are correctly assigned and used within the test functions.


45-101: Test cases in TestShowProof are well-defined.

The new fields in the test cases are correctly used, and the assertions validate the expected behavior.


104-172: Test cases in TestListProof are well-defined.

The new arguments and flags in the request function are correctly used, and the assertions validate the expected behavior.

@bryanchriswhite bryanchriswhite merged commit aeb8d0f into main Jul 12, 2024
11 checks passed
@bryanchriswhite bryanchriswhite deleted the issues/584/test/proof-cli-query branch July 12, 2024 06:56
bryanchriswhite added a commit that referenced this pull request Jul 12, 2024
…session-manager

* pokt/main:
  [Observables] chore: add `ReplayObservable#SubscribeFromLatestBufferedOffset()` (#647)
  [Observability] Add claim relays counter (#644)
  [Code Health] chore: log unused error when updating relay mining difficulty (#683)
  [Testing] chore: uncomment proof CLI query tests (#668)
@bryanchriswhite bryanchriswhite linked an issue Jul 12, 2024 that may be closed by this pull request
15 tasks
bryanchriswhite added a commit that referenced this pull request Jul 15, 2024
…ent-balances

* pokt/main:
  [TODOs] refactor: proof path calculation (#659)
  [Dependencies] bump go-getter and ibc-go (#691)
  [Relayminer] refactor: `relayerSessionsManager#waitForBlock()` (#648)
  [Observables] chore: add `ReplayObservable#SubscribeFromLatestBufferedOffset()` (#647)
  [Observability] Add claim relays counter (#644)
  [Code Health] chore: log unused error when updating relay mining difficulty (#683)
  [Testing] chore: uncomment proof CLI query tests (#668)
  build(deps): bump ws from 7.5.9 to 7.5.10 in /docusaurus (#686)
  build(deps): bump webpack-dev-middleware from 5.3.3 to 5.3.4 in /docusaurus (#688)
  build(deps): bump express from 4.18.2 to 4.19.2 in /docusaurus (#687)
  build(deps): bump follow-redirects from 1.15.3 to 1.15.6 in /docusaurus (#685)
  build(deps): bump braces from 3.0.2 to 3.0.3 in /docusaurus (#689)
  [CosmosSDK] Bump to v0.50.7 (#682)
bryanchriswhite added a commit that referenced this pull request Jul 15, 2024
…ation-overserviced

* pokt/main:
  [TODOs] refactor: proof path calculation (#659)
  [Dependencies] bump go-getter and ibc-go (#691)
  [Relayminer] refactor: `relayerSessionsManager#waitForBlock()` (#648)
  [Observables] chore: add `ReplayObservable#SubscribeFromLatestBufferedOffset()` (#647)
  [Observability] Add claim relays counter (#644)
  [Code Health] chore: log unused error when updating relay mining difficulty (#683)
  [Testing] chore: uncomment proof CLI query tests (#668)
  build(deps): bump ws from 7.5.9 to 7.5.10 in /docusaurus (#686)
  build(deps): bump webpack-dev-middleware from 5.3.3 to 5.3.4 in /docusaurus (#688)
  build(deps): bump express from 4.18.2 to 4.19.2 in /docusaurus (#687)
  build(deps): bump follow-redirects from 1.15.3 to 1.15.6 in /docusaurus (#685)
  build(deps): bump braces from 3.0.2 to 3.0.3 in /docusaurus (#689)
  [CosmosSDK] Bump to v0.50.7 (#682)
bryanchriswhite added a commit that referenced this pull request Jul 15, 2024
…ation-use-index

* pokt/main:
  [TODOs] refactor: proof path calculation (#659)
  [Dependencies] bump go-getter and ibc-go (#691)
  [Relayminer] refactor: `relayerSessionsManager#waitForBlock()` (#648)
  [Observables] chore: add `ReplayObservable#SubscribeFromLatestBufferedOffset()` (#647)
  [Observability] Add claim relays counter (#644)
  [Code Health] chore: log unused error when updating relay mining difficulty (#683)
  [Testing] chore: uncomment proof CLI query tests (#668)
  build(deps): bump ws from 7.5.9 to 7.5.10 in /docusaurus (#686)
  build(deps): bump webpack-dev-middleware from 5.3.3 to 5.3.4 in /docusaurus (#688)
  build(deps): bump express from 4.18.2 to 4.19.2 in /docusaurus (#687)
  build(deps): bump follow-redirects from 1.15.3 to 1.15.6 in /docusaurus (#685)
  build(deps): bump braces from 3.0.2 to 3.0.3 in /docusaurus (#689)
  [CosmosSDK] Bump to v0.50.7 (#682)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Test (or test utils) additions, fixes, improvements or other
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

[TODO] @Olshansk's (and now @Bryan's) Blocker TODOs
2 participants