Skip to content

Commit 40437f8

Browse files
committed
chore: Update tests
1 parent 13a27a3 commit 40437f8

File tree

6 files changed

+17
-19
lines changed

6 files changed

+17
-19
lines changed

tests/e2e/ica_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,15 @@ func TestICA(t *testing.T) {
7878
path.EndpointA.ChannelConfig = &ibctesting.ChannelConfig{
7979
PortID: portID,
8080
Version: version,
81-
Order: channeltypes.ORDERED,
81+
Order: channeltypes.UNORDERED,
8282
}
8383
path.EndpointB.ChannelID = ""
8484
path.EndpointB.ChannelConfig = &ibctesting.ChannelConfig{
8585
PortID: icatypes.HostPortID,
8686
Version: icatypes.Version,
87-
Order: channeltypes.ORDERED,
87+
Order: channeltypes.UNORDERED,
8888
}
89-
coord.CreateChannels(&path.Path)
89+
path.CreateChannels()
9090

9191
// assert ICA exists on controller
9292
contApp := controllerChain.GetWasmApp()

tests/integration/ibc_integration_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,17 @@ func TestIBCReflectContract(t *testing.T) {
6060
path.EndpointA.ChannelConfig = &ibctesting.ChannelConfig{
6161
PortID: sourcePortID,
6262
Version: "ibc-reflect-v1",
63-
Order: channeltypes.ORDERED,
63+
Order: channeltypes.UNORDERED,
6464
}
6565
path.EndpointB.ChannelConfig = &ibctesting.ChannelConfig{
6666
PortID: counterpartPortID,
6767
Version: "ibc-reflect-v1",
68-
Order: channeltypes.ORDERED,
68+
Order: channeltypes.UNORDERED,
6969
}
7070

7171
coordinator.SetupConnections(&path.Path)
7272

73-
coordinator.CreateChannels(&path.Path)
73+
path.CreateChannels()
7474

7575
// TODO: query both contracts directly to ensure they have registered the proper connection
7676
// (and the chainB has created a reflect contract)
@@ -329,7 +329,7 @@ func TestOnIBCPacketReceive(t *testing.T) {
329329
}
330330

331331
coord.SetupConnections(&path.Path)
332-
coord.CreateChannels(&path.Path)
332+
path.CreateChannels()
333333
coord.CommitBlock(chainA.TestChain, chainB.TestChain)
334334
require.Equal(t, 0, len(*chainA.PendingSendPackets))
335335
require.Equal(t, 0, len(*chainB.PendingSendPackets))
@@ -404,7 +404,7 @@ func TestIBCAsyncAck(t *testing.T) {
404404
}
405405

406406
coord.SetupConnections(&path.Path)
407-
coord.CreateChannels(&path.Path)
407+
path.CreateChannels()
408408
coord.CommitBlock(chainA.TestChain, chainB.TestChain)
409409
require.Equal(t, 0, len(*chainA.PendingSendPackets))
410410
require.Equal(t, 0, len(*chainB.PendingSendPackets))

tests/integration/relay_pingpong_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func TestPingPong(t *testing.T) {
8282
Order: channeltypes.ORDERED,
8383
}
8484
coordinator.SetupConnections(&path.Path)
85-
coordinator.CreateChannels(&path.Path)
85+
path.CreateChannels()
8686

8787
// trigger start game via execute
8888
const startValue uint64 = 100

tests/integration/relay_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ func TestFromIBCTransferToContract(t *testing.T) {
124124
}
125125

126126
coordinator.SetupConnections(&path.Path)
127-
coordinator.CreateChannels(&path.Path)
127+
path.CreateChannels()
128128

129129
originalChainABalance := chainA.Balance(chainA.SenderAccount.GetAddress(), sdk.DefaultBondDenom)
130130
// when transfer via sdk transfer from A (module) -> B (contract)
@@ -196,7 +196,7 @@ func TestContractCanInitiateIBCTransferMsg(t *testing.T) {
196196
Order: channeltypes.UNORDERED,
197197
}
198198
coordinator.SetupConnections(&path.Path)
199-
coordinator.CreateChannels(&path.Path)
199+
path.CreateChannels()
200200

201201
// when contract is triggered to send IBCTransferMsg
202202
receiverAddress := chainB.SenderAccount.GetAddress()
@@ -268,7 +268,7 @@ func TestContractCanEmulateIBCTransferMessage(t *testing.T) {
268268
Order: channeltypes.UNORDERED,
269269
}
270270
coordinator.SetupConnections(&path.Path)
271-
coordinator.CreateChannels(&path.Path)
271+
path.CreateChannels()
272272

273273
// when contract is triggered to send the ibc package to chain B
274274
timeout := uint64(chainB.LatestCommittedHeader.Header.Time.Add(time.Hour).UnixNano()) // enough time to not timeout
@@ -343,7 +343,7 @@ func TestContractCanEmulateIBCTransferMessageWithTimeout(t *testing.T) {
343343
Order: channeltypes.UNORDERED,
344344
}
345345
coordinator.SetupConnections(&path.Path)
346-
coordinator.CreateChannels(&path.Path)
346+
path.CreateChannels()
347347
coordinator.UpdateTime()
348348

349349
// when contract is triggered to send the ibc package to chain B
@@ -430,7 +430,7 @@ func TestContractEmulateIBCTransferMessageOnDiffContractIBCChannel(t *testing.T)
430430
Order: channeltypes.UNORDERED,
431431
}
432432
coordinator.SetupConnections(&path.Path)
433-
coordinator.CreateChannels(&path.Path)
433+
path.CreateChannels()
434434

435435
// when contract is triggered to send the ibc package to chain B
436436
timeout := uint64(chainB.LatestCommittedHeader.Header.Time.Add(time.Hour).UnixNano()) // enough time to not timeout
@@ -491,7 +491,7 @@ func TestContractHandlesChannelClose(t *testing.T) {
491491
Order: channeltypes.UNORDERED,
492492
}
493493
coordinator.SetupConnections(&path.Path)
494-
coordinator.CreateChannels(&path.Path)
494+
path.CreateChannels()
495495
wasmibctesting.CloseChannel(coordinator, &path.Path)
496496
assert.True(t, myContractB.closeCalled)
497497
}
@@ -541,7 +541,7 @@ func TestContractHandlesChannelCloseNotOwned(t *testing.T) {
541541
Order: channeltypes.UNORDERED,
542542
}
543543
coordinator.SetupConnections(&path.Path)
544-
coordinator.CreateChannels(&path.Path)
544+
path.CreateChannels()
545545

546546
closeIBCChannelMsg := &types.MsgExecuteContract{
547547
Sender: chainA.SenderAccount.GetAddress().String(),

x/wasm/keeper/genesis_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import (
1313
abci "github.com/cometbft/cometbft/abci/types"
1414
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
1515
dbm "github.com/cosmos/cosmos-db"
16-
ibcapi "github.com/cosmos/ibc-go/v10/modules/core/api"
1716
fuzz "github.com/google/gofuzz"
1817
"github.com/stretchr/testify/assert"
1918
"github.com/stretchr/testify/require"
@@ -699,7 +698,6 @@ func setupKeeper(t *testing.T) (*Keeper, sdk.Context) {
699698
types.VMConfig{},
700699
AvailableCapabilities,
701700
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
702-
ibcapi.NewRouter(),
703701
)
704702
return &srcKeeper, ctx
705703
}

x/wasm/keeper/options_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ func TestConstructorOptions(t *testing.T) {
155155
opt := spec.srcOpt
156156
_, gotPostOptMarker := opt.(postOptsFn)
157157
require.Equal(t, spec.isPostOpt, gotPostOptMarker)
158-
k := NewKeeper(codec, runtime.NewKVStoreService(storeKey), authkeeper.AccountKeeper{}, &bankkeeper.BaseKeeper{}, stakingkeeper.Keeper{}, nil, nil, nil, nil, nil, nil, nil, tempDir, types.DefaultNodeConfig(), types.VMConfig{}, AvailableCapabilities, "", nil, spec.srcOpt)
158+
k := NewKeeper(codec, runtime.NewKVStoreService(storeKey), authkeeper.AccountKeeper{}, &bankkeeper.BaseKeeper{}, stakingkeeper.Keeper{}, nil, nil, nil, nil, nil, nil, nil, tempDir, types.DefaultNodeConfig(), types.VMConfig{}, AvailableCapabilities, "", spec.srcOpt)
159159
spec.verify(t, k)
160160
})
161161
}

0 commit comments

Comments
 (0)