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

IBC Testing Package v2 #114

Merged
merged 24 commits into from
Apr 22, 2021
Merged

IBC Testing Package v2 #114

merged 24 commits into from
Apr 22, 2021

Conversation

colin-axner
Copy link
Contributor

@colin-axner colin-axner commented Apr 9, 2021

Description

closes: #106


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

@colin-axner colin-axner changed the title Refactor IBC testing package Refactor IBC testing package part 1 Apr 13, 2021
@colin-axner colin-axner marked this pull request as ready for review April 13, 2021 10:59
@colin-axner
Copy link
Contributor Author

The IBC testing refactor will be a multi part refactor.

Part 1 introduces the new design of the testing package

  • global time held by coordinator and chains only need to update time before executing messages
  • paths/endpoints are added. Most functionality will happen via endpoints and relaying will happen via paths

Part 2 refactor tests to use the new design and remove all the old functions

Part 3 will implement a TestingApp interface so outside repos can use the testing package

Part 4 will update docs and do polishing as needed

@colin-axner
Copy link
Contributor Author

I've tested that SetupNew works (this will be renamed to Setup when the old functions are removed)

testing/app.go Outdated Show resolved Hide resolved
modules/core/03-connection/keeper/verify_test.go Outdated Show resolved Hide resolved
testing/chain.go Show resolved Hide resolved
testing/chain.go Outdated Show resolved Hide resolved
testing/chain.go Show resolved Hide resolved
testing/coordinator.go Outdated Show resolved Hide resolved
testing/coordinator.go Outdated Show resolved Hide resolved
@codecov-io
Copy link

Codecov Report

Merging #114 (bf0e153) into main (4e145d8) will decrease coverage by 1.42%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #114      +/-   ##
==========================================
- Coverage   65.22%   63.79%   -1.43%     
==========================================
  Files         127      130       +3     
  Lines        8413     8601     +188     
==========================================
  Hits         5487     5487              
- Misses       2561     2749     +188     
  Partials      365      365              
Impacted Files Coverage Δ
testing/chain.go 2.53% <0.00%> (-0.02%) ⬇️
testing/coordinator.go 0.00% <0.00%> (ø)
testing/endpoint.go 0.00% <0.00%> (ø)
testing/events.go 0.00% <0.00%> (ø)
testing/path.go 0.00% <0.00%> (ø)
testing/simapp/test_helpers.go 0.51% <ø> (+0.02%) ⬆️

@colin-axner colin-axner changed the title Refactor IBC testing package part 1 Refactor IBC testing package Part 1 Apr 13, 2021
Copy link
Member

@AdityaSripal AdityaSripal left a comment

Choose a reason for hiding this comment

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

Looks great! I think the channel testing needs to be abstracted away from transfer/mock to be usable by 3rd part app developers

testing/config.go Show resolved Hide resolved
testing/coordinator.go Show resolved Hide resolved
testing/coordinator.go Outdated Show resolved Hide resolved
testing/endpoint.go Show resolved Hide resolved
testing/endpoint.go Outdated Show resolved Hide resolved
testing/endpoint.go Outdated Show resolved Hide resolved
testing/config.go Show resolved Hide resolved
testing/endpoint.go Outdated Show resolved Hide resolved
Copy link
Member

@AdityaSripal AdityaSripal left a comment

Choose a reason for hiding this comment

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

Small request, everything else looks great!

modules/core/keeper/msg_server_test.go Outdated Show resolved Hide resolved
* remove old testing code, update light client tests, update part of transfer tests

* fix transfer tests

* remove old code from testing package

* refactor 02-client tests

* refactor 03-connection

* all tests passing

* self review fixes

* ignore testing package for codecov

* Update modules/core/03-connection/keeper/verify_test.go
* IBCKeeper reference into an interface function

* move to testing app interface wip

* add rest of interface functions, fix tests

* finish making testing app modular
@colin-axner colin-axner changed the title Refactor IBC testing package Part 1 IBC Testing Package v2 Apr 21, 2021
* update README

* test modularity with transfer, update README, minor fixes
@colin-axner colin-axner enabled auto-merge (squash) April 22, 2021 09:28
@colin-axner colin-axner merged commit db6f316 into main Apr 22, 2021
@colin-axner colin-axner deleted the colin/106-ibc-testing branch April 22, 2021 09:38
faddat referenced this pull request in notional-labs/ibc-go Feb 23, 2022
CosmosCar pushed a commit to caelus-labs/ibc-go that referenced this pull request Nov 6, 2023
Bumps [github.com/pelletier/go-toml](https://github.com/pelletier/go-toml) from 1.9.3 to 1.9.4.
- [Release notes](https://github.com/pelletier/go-toml/releases)
- [Commits](pelletier/go-toml@v1.9.3...v1.9.4)

---
updated-dependencies:
- dependency-name: github.com/pelletier/go-toml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.

Create testing package interface
3 participants