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

imp: ehnance ICS-07 CosmWasm tests using Timestamp::now() + add test_cw_client_expiry #1181

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

Farhad-Shabani
Copy link
Member

Relevant to: #1176

Description

I meant to write a test to cover the scenario that #1176 aimed to address. However, I didn't get a chance to complete this task before my leave. Nonetheless, I managed to make some improvements, such as utilizing Timestamp::now(), which enables a more accurate simulation of real-world cases like client expiry. I also added test_cw_client_expiry.
@rnbguy Please feel free to apply your review directly to this PR and proceed with merging it.


PR author checklist:

  • Added tests.
  • Tagged one reviewer who will be the one responsible for shepherding this PR.

Reviewer checklist:

  • Reviewed Files changed in the GitHub PR explorer.
  • Manually tested (in case integration/unit/mock tests are absent).

@Farhad-Shabani Farhad-Shabani added the O: testing Objective: aims to improve testing coverage label Apr 22, 2024
@Farhad-Shabani Farhad-Shabani added this to the 0.52.0 milestone Apr 22, 2024
@Farhad-Shabani Farhad-Shabani requested a review from rnbguy April 22, 2024 07:53
Copy link

codecov bot commented Apr 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.37%. Comparing base (80b8084) to head (8aba3ed).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1181      +/-   ##
==========================================
- Coverage   64.39%   64.37%   -0.03%     
==========================================
  Files         230      230              
  Lines       22053    22053              
==========================================
- Hits        14201    14196       -5     
- Misses       7852     7857       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

let header = tendermint_testgen::Header::new(&self.validators)
.chain_id(self.chain_id.as_str())
.height(header_height.revision_height())
.time(future_time)
.time(Time::now())
Copy link
Member

Choose a reason for hiding this comment

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

we can take it as argument to the method.

Copy link
Member

Choose a reason for hiding this comment

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

let's refactor for parametrized testing in separate PRs.

Copy link
Member

@rnbguy rnbguy left a comment

Choose a reason for hiding this comment

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

LGTM ✨

@rnbguy rnbguy added this pull request to the merge queue Apr 24, 2024
Merged via the queue into main with commit 74208d0 Apr 24, 2024
19 checks passed
@rnbguy rnbguy deleted the farhad/improve-ics07-cw-tests branch April 24, 2024 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O: testing Objective: aims to improve testing coverage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants