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

style: remove unused code in tests #5108

Merged
merged 2 commits into from
May 8, 2023
Merged

style: remove unused code in tests #5108

merged 2 commits into from
May 8, 2023

Conversation

faddat
Copy link
Member

@faddat faddat commented May 7, 2023

Closes: #XXX

What is the purpose of the change

This PR removes unused code in tests.

Brief Changelog

  • remove unused constants, variables, and functions in osmosis' tests.

Testing and Verifying

This change is a trivial rework / code cleanup without any test coverage.

Documentation and Release Note

  • Does this pull request introduce a new feature or user-facing behavior changes? no
  • Is a relevant changelog entry added to the Unreleased section in CHANGELOG.md? no
  • How is the feature or change documented? not applicable

@faddat faddat added the V:state/compatible/backport State machine compatible PR, should be backported label May 7, 2023
@faddat faddat added A:backport/v15.x backport patches to v15.x branch no-changelog and removed C:x/lockup C:CLI C:x/gamm Changes, features and bugs related to the gamm module. C:x/incentives C:x/superfluid C:x/tokenfactory C:x/twap Changes to the twap module C:x/concentrated-liquidity C:x/poolmanager labels May 7, 2023
Copy link
Member

@pysel pysel left a comment

Choose a reason for hiding this comment

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

lgtm!

Comment on lines -51 to -53
pathBA *ibctesting.Path
pathCA *ibctesting.Path
pathCB *ibctesting.Path
Copy link
Member

Choose a reason for hiding this comment

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

imo it might make sense to leave these, just in case they might be useful in the future

Comment on lines 21 to 22
// Environment variable name to skip state sync testing
skipStateSyncEnv = "OSMOSIS_E2E_SKIP_STATE_SYNC"
Copy link
Member

@p0mvn p0mvn May 8, 2023

Choose a reason for hiding this comment

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

This is being used here, we should restore this:

if s.skipStateSync {

Copy link
Member Author

@faddat faddat May 8, 2023

Choose a reason for hiding this comment

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

hmmmm I thought it was used. Any idea how toget one's editor to see that? Or ci for that matter?

basically I made that particular change, cause I noticed that doing so did not cause anything else to break. Adding er back now.

Copy link
Member Author

Choose a reason for hiding this comment

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

aha! env vars for e2e -- this explains what I saw....

Copy link
Member

Choose a reason for hiding this comment

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

Ahh I see now. I think this was intended to be used in place of the hardcoded value here:

if str := os.Getenv("OSMOSIS_E2E_SKIP_STATE_SYNC"); len(str) > 0 {

but was never replaced. So your editor was correct to catch this as unused

Copy link
Member

Choose a reason for hiding this comment

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

Not going to block this PR on this change but we can replace the hardcoded value with skipStateSyncEnv in the future.

Thanks @faddat

@p0mvn p0mvn merged commit 7ec4c2f into main May 8, 2023
@p0mvn p0mvn deleted the faddat/unused-in-tests branch May 8, 2023 19:25
mergify bot pushed a commit that referenced this pull request May 8, 2023
* unused code in tests

* re-add skip state sync

(cherry picked from commit 7ec4c2f)

# Conflicts:
#	tests/ibc-hooks/ibc_middleware_test.go
#	x/concentrated-liquidity/fees_test.go
#	x/concentrated-liquidity/incentives_test.go
#	x/concentrated-liquidity/lp_test.go
#	x/concentrated-liquidity/position_test.go
#	x/concentrated-liquidity/store_test.go
#	x/gamm/keeper/pool_service_test.go
#	x/poolmanager/types/routes_test.go
#	x/superfluid/keeper/migrate_test.go
#	x/superfluid/keeper/unpool_test.go
#	x/twap/listeners_test.go
pysel pushed a commit that referenced this pull request Jun 6, 2023
* unused code in tests

* re-add skip state sync
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:backport/v15.x backport patches to v15.x branch C:CLI C:x/concentrated-liquidity C:x/gamm Changes, features and bugs related to the gamm module. C:x/incentives C:x/lockup C:x/poolmanager C:x/superfluid C:x/tokenfactory C:x/twap Changes to the twap module V:state/compatible/backport State machine compatible PR, should be backported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants