Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerKSI committed Feb 23, 2024
1 parent 8653de2 commit 1cbc26d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
9 changes: 4 additions & 5 deletions testing/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,14 @@ var (
Coins99999999uband = sdk.NewCoins(sdk.NewInt64Coin("uband", 99999999))
Coins100000000uband = sdk.NewCoins(sdk.NewInt64Coin("uband", 100000000))
BadCoins = []sdk.Coin{{Denom: "uband", Amount: sdk.NewInt(-1)}}
ChainID = "BANDCHAIN"
Port1 = "port-1"
Port2 = "port-2"
Channel1 = "channel-1"
Channel2 = "channel-2"
)

const (
ChainID string = "BANDCHAIN"
Port1 = "port-1"
Port2 = "port-2"
Channel1 = "channel-1"
Channel2 = "channel-2"
TestDefaultPrepareGas uint64 = 40000
TestDefaultExecuteGas uint64 = 300000
DefaultGenTxGas = 1000000
Expand Down
10 changes: 5 additions & 5 deletions x/oracle/simulation/operations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/cosmos/cosmos-sdk/x/bank/testutil"
"github.com/stretchr/testify/suite"

"github.com/bandprotocol/chain/v2/testing/testapp"
bandtesting "github.com/bandprotocol/chain/v2/testing"
"github.com/bandprotocol/chain/v2/x/oracle/simulation"
"github.com/bandprotocol/chain/v2/x/oracle/types"
)
Expand All @@ -22,15 +22,15 @@ type SimTestSuite struct {
suite.Suite

ctx sdk.Context
app *testapp.TestingApp
app *bandtesting.TestingApp
r *rand.Rand
accs []simtypes.Account
}

func (suite *SimTestSuite) SetupTest() {
app, _, _ := testapp.CreateTestInput(true)
app, _ := bandtesting.CreateTestApp(suite.T(), true)
suite.app = app
suite.ctx = app.BaseApp.NewContext(false, tmproto.Header{ChainID: testapp.ChainID})
suite.ctx = app.BaseApp.NewContext(false, tmproto.Header{ChainID: bandtesting.ChainID})
s := rand.NewSource(1)
suite.r = rand.New(s)
suite.accs = suite.getTestingAccounts(suite.r, 10)
Expand All @@ -39,7 +39,7 @@ func (suite *SimTestSuite) SetupTest() {
suite.app.BeginBlock(
abci.RequestBeginBlock{
Header: tmproto.Header{
ChainID: testapp.ChainID,
ChainID: bandtesting.ChainID,
Height: suite.app.LastBlockHeight() + 1,
AppHash: suite.app.LastCommitID().Hash,
},
Expand Down

0 comments on commit 1cbc26d

Please sign in to comment.