Skip to content

Commit

Permalink
fix Test_RollAppStateUpdateFail_Celes (#571)
Browse files Browse the repository at this point in the history
  • Loading branch information
anhductn2001 authored Dec 25, 2024
1 parent 9563e2b commit 63fa7a8
Show file tree
Hide file tree
Showing 31 changed files with 3,670 additions and 3,184 deletions.
40 changes: 32 additions & 8 deletions tests/admc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,10 @@ func TestADMC_Originates_HubtoRA_EVM(t *testing.T) {

//Update white listed relayers
_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath, []string{wallet.FormattedAddress()})
require.NoError(t, err)
if err != nil {
_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath, []string{wallet.FormattedAddress()})
require.NoError(t, err)
}

CreateChannel(ctx, t, r, eRep, dymension.CosmosChain, rollapp1.CosmosChain, ibcPath)

Expand Down Expand Up @@ -328,7 +331,10 @@ func TestADMC_Migrate_Empty_User_Memo_EVM(t *testing.T) {

//Update white listed relayers
_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath, []string{wallet.FormattedAddress()})
require.NoError(t, err)
if err != nil {
_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath, []string{wallet.FormattedAddress()})
require.NoError(t, err)
}

CreateChannel(ctx, t, r, eRep, dymension.CosmosChain, rollapp1.CosmosChain, ibcPath)

Expand Down Expand Up @@ -609,7 +615,10 @@ func TestADMC_Migrate_With_User_Memo_EVM(t *testing.T) {

//Update white listed relayers
_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath, []string{wallet.FormattedAddress()})
require.NoError(t, err)
if err != nil {
_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath, []string{wallet.FormattedAddress()})
require.NoError(t, err)
}

CreateChannel(ctx, t, r, eRep, dymension.CosmosChain, rollapp1.CosmosChain, ibcPath)

Expand Down Expand Up @@ -896,7 +905,10 @@ func TestADMC_Originates_HubtoRA_Wasm(t *testing.T) {

//Update white listed relayers
_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath, []string{wallet.FormattedAddress()})
require.NoError(t, err)
if err != nil {
_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath, []string{wallet.FormattedAddress()})
require.NoError(t, err)
}

CreateChannel(ctx, t, r, eRep, dymension.CosmosChain, rollapp1.CosmosChain, ibcPath)

Expand Down Expand Up @@ -1099,7 +1111,10 @@ func TestADMC_Migrate_Empty_User_Memo_Wasm(t *testing.T) {

//Update white listed relayers
_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath, []string{wallet.FormattedAddress()})
require.NoError(t, err)
if err != nil {
_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath, []string{wallet.FormattedAddress()})
require.NoError(t, err)
}

CreateChannel(ctx, t, r, eRep, dymension.CosmosChain, rollapp1.CosmosChain, ibcPath)

Expand Down Expand Up @@ -1377,7 +1392,10 @@ func TestADMC_Migrate_With_User_Memo_Wasm(t *testing.T) {

//Update white listed relayers
_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath, []string{wallet.FormattedAddress()})
require.NoError(t, err)
if err != nil {
_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath, []string{wallet.FormattedAddress()})
require.NoError(t, err)
}

CreateChannel(ctx, t, r, eRep, dymension.CosmosChain, rollapp1.CosmosChain, ibcPath)

Expand Down Expand Up @@ -1689,7 +1707,10 @@ func TestADMC_MetaData_NotFound_EVM(t *testing.T) {

//Update white listed relayers
_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath, []string{wallet.FormattedAddress()})
require.NoError(t, err)
if err != nil {
_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath, []string{wallet.FormattedAddress()})
require.NoError(t, err)
}

CreateChannel(ctx, t, r, eRep, dymension.CosmosChain, rollapp1.CosmosChain, ibcPath)

Expand Down Expand Up @@ -1922,7 +1943,10 @@ func TestADMC_MetaData_NotFound_Wasm(t *testing.T) {

//Update white listed relayers
_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath, []string{wallet.FormattedAddress()})
require.NoError(t, err)
if err != nil {
_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath, []string{wallet.FormattedAddress()})
require.NoError(t, err)
}

CreateChannel(ctx, t, r, eRep, dymension.CosmosChain, rollapp1.CosmosChain, ibcPath)

Expand Down
45 changes: 36 additions & 9 deletions tests/automated_denommetadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,19 @@ func TestADMC_Hub_to_RA_reserved_EVM(t *testing.T) {

//Update white listed relayers
_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath, []string{wallet1.FormattedAddress()})
require.NoError(t, err)
if err != nil {
_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath, []string{wallet1.FormattedAddress()})
require.NoError(t, err)
}

err = testutil.WaitForBlocks(ctx, 2, dymension)
require.NoError(t, err)

_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath2, []string{wallet2.FormattedAddress()})
require.NoError(t, err)
if err != nil {
_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath2, []string{wallet2.FormattedAddress()})
require.NoError(t, err)
}

CreateChannel(ctx, t, r1, eRep, dymension.CosmosChain, rollapp1.CosmosChain, ibcPath)
CreateChannel(ctx, t, r2, eRep, dymension.CosmosChain, rollapp2.CosmosChain, ibcPath)
Expand Down Expand Up @@ -514,7 +520,10 @@ func TestADMC_Hub_to_RA_3rd_Party_EVM(t *testing.T) {

//Update white listed relayers
_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath, []string{wallet1.FormattedAddress()})
require.NoError(t, err)
if err != nil {
_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath, []string{wallet1.FormattedAddress()})
require.NoError(t, err)
}

CreateChannel(ctx, t, r1, eRep, dymension.CosmosChain, rollapp1.CosmosChain, ibcPath)
CreateChannel(ctx, t, r3, eRep, dymension.CosmosChain, gaia, ibcPath)
Expand Down Expand Up @@ -845,13 +854,19 @@ func TestADMC_Hub_to_RA_reserved_Wasm(t *testing.T) {

//Update white listed relayers
_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath, []string{wallet1.FormattedAddress()})
require.NoError(t, err)
if err != nil {
_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath, []string{wallet1.FormattedAddress()})
require.NoError(t, err)
}

err = testutil.WaitForBlocks(ctx, 2, dymension)
require.NoError(t, err)

_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath2, []string{wallet2.FormattedAddress()})
require.NoError(t, err)
if err != nil {
_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath2, []string{wallet2.FormattedAddress()})
require.NoError(t, err)
}

CreateChannel(ctx, t, r1, eRep, dymension.CosmosChain, rollapp1.CosmosChain, ibcPath)
CreateChannel(ctx, t, r2, eRep, dymension.CosmosChain, rollapp2.CosmosChain, ibcPath)
Expand Down Expand Up @@ -1210,13 +1225,19 @@ func TestADMC_Hub_to_RA_3rd_Party_Wasm(t *testing.T) {

//Update white listed relayers
_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath, []string{wallet1.FormattedAddress()})
require.NoError(t, err)
if err != nil {
_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath, []string{wallet1.FormattedAddress()})
require.NoError(t, err)
}

err = testutil.WaitForBlocks(ctx, 2, dymension)
require.NoError(t, err)

_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath2, []string{wallet2.FormattedAddress()})
require.NoError(t, err)
if err != nil {
_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath2, []string{wallet2.FormattedAddress()})
require.NoError(t, err)
}

CreateChannel(ctx, t, r1, eRep, dymension.CosmosChain, rollapp1.CosmosChain, ibcPath)
CreateChannel(ctx, t, r2, eRep, dymension.CosmosChain, rollapp2.CosmosChain, ibcPath)
Expand Down Expand Up @@ -1498,7 +1519,10 @@ func TestADMC_Hub_to_RA_Migrate_Dym_EVM(t *testing.T) {

//Update white listed relayers
_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath, []string{wallet.FormattedAddress()})
require.NoError(t, err)
if err != nil {
_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath, []string{wallet.FormattedAddress()})
require.NoError(t, err)
}

CreateChannel(ctx, t, r, eRep, dymension.CosmosChain, rollapp1.CosmosChain, ibcPath)

Expand Down Expand Up @@ -1724,7 +1748,10 @@ func TestADMC_Hub_to_RA_Migrate_Dym_Wasm(t *testing.T) {

//Update white listed relayers
_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath, []string{wallet.FormattedAddress()})
require.NoError(t, err)
if err != nil {
_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath, []string{wallet.FormattedAddress()})
require.NoError(t, err)
}

CreateChannel(ctx, t, r, eRep, dymension.CosmosChain, rollapp1.CosmosChain, ibcPath)

Expand Down
10 changes: 8 additions & 2 deletions tests/bridging_fee_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,13 +329,19 @@ func TestChangeBridgeFeeParam_EVM(t *testing.T) {

//Update white listed relayers
_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath, []string{wallet1.FormattedAddress()})
require.NoError(t, err)
if err != nil {
_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath, []string{wallet1.FormattedAddress()})
require.NoError(t, err)
}

err = testutil.WaitForBlocks(ctx, 2, dymension)
require.NoError(t, err)

_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath2, []string{wallet2.FormattedAddress()})
require.NoError(t, err)
if err != nil {
_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath2, []string{wallet2.FormattedAddress()})
require.NoError(t, err)
}

CreateChannel(ctx, t, r1, eRep, dymension.CosmosChain, rollapp1.CosmosChain, ibcPath)
CreateChannel(ctx, t, r2, eRep, dymension.CosmosChain, rollapp2.CosmosChain, anotherIbcPath)
Expand Down
5 changes: 4 additions & 1 deletion tests/canonical_light_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,10 @@ func TestIBCTransferRA_3rdSameChainID_EVM(t *testing.T) {

//Update white listed relayers
_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath, []string{wallet.FormattedAddress()})
require.NoError(t, err)
if err != nil {
_, err = dymension.GetNode().UpdateWhitelistedRelayers(ctx, "sequencer", keyPath, []string{wallet.FormattedAddress()})
require.NoError(t, err)
}

// create ibc path between dymension and gaia, and between dymension and rollapp1
CreateChannel(ctx, t, r, eRep, dymension.CosmosChain, rollapp1.CosmosChain, ibcPath)
Expand Down
Loading

0 comments on commit 63fa7a8

Please sign in to comment.