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

Common test harness code for IBC tests #5558

Closed
4 of 5 tasks
cwgoes opened this issue Jan 23, 2020 · 7 comments
Closed
4 of 5 tasks

Common test harness code for IBC tests #5558

cwgoes opened this issue Jan 23, 2020 · 7 comments
Assignees
Labels
help wanted T: Tests Type: Code Hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity.

Comments

@cwgoes
Copy link
Contributor

cwgoes commented Jan 23, 2020

De-duplicate this code & put it in a central location that can be imported.

ToDos:

cc @fedekunze

@cwgoes cwgoes added T: Tests x/ibc Type: Code Hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity. labels Jan 23, 2020
@cwgoes cwgoes added this to the IBC Implementation milestone Jan 23, 2020
@jackzampolin
Copy link
Member

I think #5691 is a dupe of this issue. Going to repost that content here cc @AdityaSripal

@jackzampolin
Copy link
Member

jackzampolin commented Mar 17, 2020

Tests on IBC require some cleanup along with end-to-end tests. Individual tasks include:

Cleanup:

  • Cleaning up the TestChain methods and making them along with TestChain itself unexported
  • Deleting all unused variables
  • Commenting test functions so it is clear what they are intended to do
  • Removing repeated code where possible (having a testing package within x/ibc with common test suite functionality could be useful).

Testing improvements:

  • Create complete end to end tests that do nothing but start up 2 simapps and send messages to each other (which send & receive packets), while querying proofs as necessary
  • Replace all mocked proofs with actual proofs retrieved from IAVL

Followup from #5711:

  • Need to rewrite some of the failed test cases in 03-connection and 04-channel so that they fail for the stated reason in the test-case name
  • Enforce consistency on connectionID naming through testsuites in 03-connection and 04-channel. Connection IDs are consistent within tests, but not across the entire test-suite which is important for understandability
  • Write tests for TimeoutOnClose and CleanupPacket for ORDERED and UNORDERED channels
  • De-duplify test setup code (mainly TestChain and queryProof) in 03-connection and 04-channel and move to separate test-utils package

@colin-axner
Copy link
Contributor

colin-axner commented Jun 1, 2020

from my look at testing so far, one good first step is to move TestChain/KeeperSuiteTest to a x/ibc/testing package. I can take this on if no one has started

@AdityaSripal
Copy link
Member

I have not started, feel free to take this @colin-axner 👍

@colin-axner
Copy link
Contributor

Following the merge of #6400, since the testing package will have stabilized in API, I think it'd be useful to do a pr for each file being updated rather than by pkg (as this has proved to result in a mega test refactor pr)

@colin-axner
Copy link
Contributor

colin-axner commented Jul 2, 2020

I'm starting on connection tests, will begin with handshake, then verify, then keeper

  • handshake_test
  • verify_test
  • keeper_test

@colin-axner
Copy link
Contributor

closing this issue since I believe the gist of it has been addressed. Any other test code that needs work or has issues should be opened with its own issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted T: Tests Type: Code Hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity.
Projects
None yet
Development

No branches or pull requests

5 participants