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

Add test for Upgrade Handler #131

Merged
merged 5 commits into from
Apr 7, 2023
Merged

Conversation

anhductn2001
Copy link
Contributor

Description and Motivation

}

var (
SecondaryDenom = "uion"

Check warning

Code scanning / Revive (reported by Codacy)

exported var SecondaryDenom should have comment or be unexported

exported var SecondaryDenom should have comment or be unexported
"github.com/White-Whale-Defi-Platform/migaloo-chain/app"
)

type KeeperTestHelper struct {

Check warning

Code scanning / Revive (reported by Codacy)

exported type KeeperTestHelper should have comment or be unexported

exported type KeeperTestHelper should have comment or be unexported
@@ -0,0 +1,154 @@
package apptesting

Check warning

Code scanning / Revive (reported by Codacy)

should have a package comment

should have a package comment
return testAddrs
}

func GenerateTestAddrs() (string, string) {

Check warning

Code scanning / Revive (reported by Codacy)

exported function GenerateTestAddrs should have comment or be unexported

exported function GenerateTestAddrs should have comment or be unexported
@@ -213,6 +213,81 @@
return app
}

func GenesisStateWithValSet(app *MigalooApp) GenesisState {

Check warning

Code scanning / Revive (reported by Codacy)

exported function GenesisStateWithValSet should have comment or be unexported

exported function GenesisStateWithValSet should have comment or be unexported
return validAddr, invalidAddr
}

// Mints and sends coins to a user account

Check warning

Code scanning / Revive (reported by Codacy)

comment on exported method KeeperTestHelper.FundAccount should be of the form "FundAccount ..."

comment on exported method KeeperTestHelper.FundAccount should be of the form "FundAccount ..."
return sdk.NewContext(ms, tmtypes.Header{}, false, logger), ms
}

// CreateTestContext creates a test context.

Check warning

Code scanning / Revive (reported by Codacy)

comment on exported method KeeperTestHelper.Commit should be of the form "Commit ..."

comment on exported method KeeperTestHelper.Commit should be of the form "Commit ..."
s.TestAccs = CreateRandomAccounts(3)
}

func (s *KeeperTestHelper) SetupTestForInitGenesis() {

Check warning

Code scanning / Revive (reported by Codacy)

exported method KeeperTestHelper.SetupTestForInitGenesis should have comment or be unexported

exported method KeeperTestHelper.SetupTestForInitGenesis should have comment or be unexported
s.FundAccount(acc, amounts)
}

func (s *KeeperTestHelper) ConfirmUpgradeSucceededs(upgradeName string, upgradeHeight int64) {

Check warning

Code scanning / Revive (reported by Codacy)

exported method KeeperTestHelper.ConfirmUpgradeSucceededs should have comment or be unexported

exported method KeeperTestHelper.ConfirmUpgradeSucceededs should have comment or be unexported
@anhductn2001 anhductn2001 marked this pull request as ready for review March 30, 2023 10:15
@faddat faddat changed the base branch from release/v2.0.x to release/v3.0.x April 7, 2023 11:18
@faddat
Copy link
Collaborator

faddat commented Apr 7, 2023

tests are so good! In the future, if codacy tags something to be addressed, please address it. For now, lgtm

@faddat faddat merged commit a3d9f4b into release/v3.0.x Apr 7, 2023
@Sen-Com Sen-Com deleted the ducnt/upgrade_handler branch June 3, 2024 10:06
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.

3 participants