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

Move e2e tests to independent folder #297

Merged
merged 16 commits into from
Aug 26, 2022
Merged

Move e2e tests to independent folder #297

merged 16 commits into from
Aug 26, 2022

Conversation

shaspitz
Copy link
Contributor

Closes #219

@shaspitz shaspitz marked this pull request as ready for review August 24, 2022 17:44
Copy link
Contributor

@mpoke mpoke left a comment

Choose a reason for hiding this comment

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

Nice work @smarshall-spitzbart. I didn't check the functionality, since I guess it's just a refactoring, right?

At the moment the structure is a bit hard to follow, maybe a README.md would help, i.e.,

  • setup_test.go -- setup for the e2e tests
  • common_test.go -- helper functions
  • channel_init_test.go -- e2e tests for the Channel Initialization sub-protocol
  • valset_update_test.go -- e2e tests for the Validator Set Update sub-protocol
  • unbonding_test.go -- e2e tests for the Completion of Unbonding Operations
  • slashing_test.go -- e2e tests for the Consumer Initiated Slashing sub-protocol
  • distribution_test.go -- e2e tests for the Reward Distribution sub-protocol
  • stop_consumer_test.go -- e2e tests for the Consumer Chain Removal sub-protocol

Move to valset_update.go the content from bonding_test.go and vsc_test.go.

Move to channel_init_test.go the content from genesis_test.go, ibc_test.go, history_test.go, proposal_test.go.

distribution_test.go will be empty for now.

Re. the 4 different ...TestSuites data structure, I think we can have only one, but let's do that in a separate PR.

README.md Outdated Show resolved Hide resolved
shaspitz and others added 2 commits August 25, 2022 15:05
Co-authored-by: Marius Poke <marius.poke@posteo.de>
@shaspitz
Copy link
Contributor Author

Nice work @smarshall-spitzbart. I didn't check the functionality, since I guess it's just a refactoring, right?

At the moment the structure is a bit hard to follow, maybe a README.md would help, i.e.,

  • setup_test.go -- setup for the e2e tests
  • common_test.go -- helper functions
  • channel_init_test.go -- e2e tests for the Channel Initialization sub-protocol
  • valset_update_test.go -- e2e tests for the Validator Set Update sub-protocol
  • unbonding_test.go -- e2e tests for the Completion of Unbonding Operations
  • slashing_test.go -- e2e tests for the Consumer Initiated Slashing sub-protocol
  • distribution_test.go -- e2e tests for the Reward Distribution sub-protocol
  • stop_consumer_test.go -- e2e tests for the Consumer Chain Removal sub-protocol

Move to valset_update.go the content from bonding_test.go and vsc_test.go.

Move to channel_init_test.go the content from genesis_test.go, ibc_test.go, history_test.go, proposal_test.go.

distribution_test.go will be empty for now.

Re. the 4 different ...TestSuites data structure, I think we can have only one, but let's do that in a separate PR.

You're correct that I didn't change any test functionality in this PR, I only moved things around.

Your mentioned file organization sounds great to me, thank you! My only correction to your proposed solution is that I believe TestTrackHistoricalInfo should go in its own file under normal_operations_test.go, since it doesn't relate to channel initialization. A new readme was added to the e2e test directory.

Lastly I've opened #300 to address the fact that we have a lot of redundant code in setup_test.go.

@shaspitz shaspitz requested a review from mpoke August 25, 2022 22:16
Copy link
Contributor

@mpoke mpoke left a comment

Choose a reason for hiding this comment

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

Great work.

@shaspitz shaspitz merged commit 469fc56 into main Aug 26, 2022
@shaspitz shaspitz deleted the e2e-refactor branch August 26, 2022 22:56
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.

Move all end-to-end tests to special folder
3 participants