-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
44 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,64 @@ | ||
package v13_test | ||
|
||
// import ( | ||
// "testing" | ||
import ( | ||
"testing" | ||
|
||
// "github.com/stretchr/testify/suite" | ||
"github.com/stretchr/testify/suite" | ||
|
||
// "github.com/comdex-official/comdex/app" | ||
// wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" | ||
// v13 "github.com/comdex-official/comdex/app/upgrades/testnet/v13" | ||
// ) | ||
"github.com/comdex-official/comdex/app" | ||
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" | ||
v13 "github.com/comdex-official/comdex/app/upgrades/testnet/v13" | ||
) | ||
|
||
// type UpgradeTestSuite struct { | ||
// app.KeeperTestHelper | ||
// } | ||
type UpgradeTestSuite struct { | ||
app.KeeperTestHelper | ||
} | ||
|
||
// func (s *UpgradeTestSuite) SetupTest() { | ||
// s.Setup() | ||
// } | ||
func (s *UpgradeTestSuite) SetupTest() { | ||
s.Setup() | ||
} | ||
|
||
// func TestKeeperTestSuite(t *testing.T) { | ||
// suite.Run(t, new(UpgradeTestSuite)) | ||
// } | ||
func TestKeeperTestSuite(t *testing.T) { | ||
suite.Run(t, new(UpgradeTestSuite)) | ||
} | ||
|
||
// // Ensures the test does not error out. | ||
// func (s *UpgradeTestSuite) TestUpgrade() { | ||
// s.Setup() | ||
// Ensures the test does not error out. | ||
func (s *UpgradeTestSuite) TestUpgrade() { | ||
s.Setup() | ||
|
||
// preUpgradeChecks(s) | ||
preUpgradeChecks(s) | ||
|
||
// upgradeHeight := int64(5) | ||
// s.ConfirmUpgradeSucceeded(v13.UpgradeName, upgradeHeight) | ||
upgradeHeight := int64(5) | ||
s.ConfirmUpgradeSucceeded(v13.UpgradeName, upgradeHeight) | ||
|
||
// postUpgradeChecks(s) | ||
// } | ||
postUpgradeChecks(s) | ||
} | ||
|
||
// func preUpgradeChecks(s *UpgradeTestSuite) { | ||
func preUpgradeChecks(s *UpgradeTestSuite) { | ||
|
||
// mp := s.App.MintKeeper.GetParams(s.Ctx) | ||
// s.Require().Equal(mp.BlocksPerYear, uint64(6311520)) | ||
mp := s.App.MintKeeper.GetParams(s.Ctx) | ||
s.Require().Equal(mp.BlocksPerYear, uint64(6311520)) | ||
|
||
// sp := s.App.SlashingKeeper.GetParams(s.Ctx) | ||
// s.Require().Equal(sp.SignedBlocksWindow, int64(100)) | ||
sp := s.App.SlashingKeeper.GetParams(s.Ctx) | ||
s.Require().Equal(sp.SignedBlocksWindow, int64(100)) | ||
|
||
// } | ||
} | ||
|
||
// func postUpgradeChecks(s *UpgradeTestSuite) { | ||
func postUpgradeChecks(s *UpgradeTestSuite) { | ||
|
||
// // Ensure the gov params have MinInitialDepositRatio added | ||
// gp := s.App.GovKeeper.GetParams(s.Ctx) | ||
// s.Require().Equal(gp.MinInitialDepositRatio, "0.200000000000000000") | ||
// Ensure the gov params have MinInitialDepositRatio added | ||
gp := s.App.GovKeeper.GetParams(s.Ctx) | ||
s.Require().Equal(gp.MinInitialDepositRatio, "0.200000000000000000") | ||
|
||
// // Ensure the mint params have doubled | ||
// mp := s.App.MintKeeper.GetParams(s.Ctx) | ||
// s.Require().Equal(mp.BlocksPerYear, uint64(6311520*2)) | ||
// Ensure the mint params have doubled | ||
mp := s.App.MintKeeper.GetParams(s.Ctx) | ||
s.Require().Equal(mp.BlocksPerYear, uint64(6311520*2)) | ||
|
||
// // Ensure the slashing params have doubled | ||
// sp := s.App.SlashingKeeper.GetParams(s.Ctx) | ||
// s.Require().Equal(sp.SignedBlocksWindow, int64(100*2)) | ||
// Ensure the slashing params have doubled | ||
sp := s.App.SlashingKeeper.GetParams(s.Ctx) | ||
s.Require().Equal(sp.SignedBlocksWindow, int64(100*2)) | ||
|
||
// // Ensure the wasm Permissionless | ||
// wp := s.App.WasmKeeper.GetParams(s.Ctx) | ||
// s.Require().Equal(wp.CodeUploadAccess, wasmtypes.AllowEverybody) | ||
// } | ||
// Ensure the wasm Permissionless | ||
wp := s.App.WasmKeeper.GetParams(s.Ctx) | ||
s.Require().Equal(wp.CodeUploadAccess, wasmtypes.AllowEverybody) | ||
} |