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

feat(e2e): add e2e tests for the evidence module #1779

Merged
merged 12 commits into from
Oct 10, 2022
Merged

Conversation

Pantani
Copy link
Contributor

@Pantani Pantani commented Oct 3, 2022

close #1676

Description

Since the evidence module doesn't have gaiad tx, this PR only adds evidence into the genesis JSON and queries all evidence.

@Pantani Pantani self-assigned this Oct 4, 2022
@codecov
Copy link

codecov bot commented Oct 4, 2022

Codecov Report

Merging #1779 (b08fc7e) into main (3466bc9) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1779   +/-   ##
=======================================
  Coverage   43.13%   43.13%           
=======================================
  Files          15       15           
  Lines        1340     1340           
=======================================
  Hits          578      578           
  Misses        742      742           
  Partials       20       20           

@@ -0,0 +1,29 @@
package e2e
Copy link
Contributor

@mmulji-ic mmulji-ic Oct 4, 2022

Choose a reason for hiding this comment

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

A more complicated scenario would be to have blocks with the following:

  • DuplicateVoteEvidence
  • LightClientAttackEvidence
    ... and check for those as well. Future todo?

hash,
}

s.executeGaiaTxCommand(ctx, c, gaiaCommand, valIdx, func(stdOut []byte, stdErr []byte) bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: we might want to rename or rework executeGaiaTxCommand for cli commands that don't require validation of the tx hash...keys and query subcommands would fall under this category.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I agree! I also moved the other API queries to the querie.go file in this PR #1780. The evidence API seems not to be working well. I opened an issue in the cosmos-sdk repo (cosmos/cosmos-sdk#13444). We can only query by CLI now, my idea was to try to put all CLI exec commands in the same file, but we can move to e2e_query_test.go. WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah sounds great 👍

Copy link
Contributor

@okwme okwme left a comment

Choose a reason for hiding this comment

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

LGTM! Feel free to merge @Pantani : )

@Pantani Pantani merged commit 415c30c into main Oct 10, 2022
@Pantani Pantani deleted the feat/e2e-evidence branch October 10, 2022 18:35
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.

Add Evidence E2E tests
4 participants