Skip to content

Commit

Permalink
fixes e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Hanna committed Aug 27, 2024
1 parent 9a3f515 commit 041667a
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions tests/e2e/e2e_setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ var (
tokenAmount = sdk.NewCoin(uatomDenom, sdk.NewInt(3300000000)) // 3,300uatom
standardFees = sdk.NewCoin(uatomDenom, sdk.NewInt(330000)) // 0.33uatom
depositAmount = sdk.NewCoin(uatomDenom, sdk.NewInt(330000000)) // 3,300uatom
distModuleAddress = authtypes.NewModuleAddress(distrtypes.ModuleName).String()
govModuleAddress = authtypes.NewModuleAddress(govtypes.ModuleName).String()
distModuleAddress = "" // note: have to set these after running InitSDKConfig so that the bech32 prefix is set
govModuleAddress = "" // note: have to set these after running InitSDKConfig so that the bech32 prefix is set
proposalCounter = 0
)

Expand All @@ -95,6 +95,8 @@ type IntegrationTestSuite struct {
// hermesResource *dockertest.Resource

valResources map[string][]*dockertest.Resource

initialized bool
}

type AddressResponse struct {
Expand All @@ -112,7 +114,15 @@ func (s *IntegrationTestSuite) SetupSuite() {
s.T().Log("setting up e2e integration test suite...")

// Setup bech32 prefix
cmd.InitSDKConfig()
if !s.initialized {
cmd.InitSDKConfig()

// note: the config gets sealed on init, so runnig this twice will throw!
s.initialized = true
}

distModuleAddress = authtypes.NewModuleAddress(distrtypes.ModuleName).String() // note: have to set these after running InitSDKConfig so that the bech32 prefix is set
govModuleAddress = authtypes.NewModuleAddress(govtypes.ModuleName).String() // note: have to set these after running InitSDKConfig so that the bech32 prefix is set

var err error
s.chainA, err = newChain()
Expand Down

0 comments on commit 041667a

Please sign in to comment.