From 67d95cfe71f04aa74c3f92084955b39febd26b6b Mon Sep 17 00:00:00 2001 From: DimitrisJim Date: Tue, 4 Apr 2023 12:31:01 +0300 Subject: [PATCH 01/14] feat: adding hermes to e2e tests. --- .github/workflows/e2e-test-workflow-call.yml | 2 +- e2e/relayer/relayer.go | 19 +++++++++++++------ e2e/testconfig/testconfig.go | 4 +++- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/workflows/e2e-test-workflow-call.yml b/.github/workflows/e2e-test-workflow-call.yml index fa6b9347488..ce813b7707c 100644 --- a/.github/workflows/e2e-test-workflow-call.yml +++ b/.github/workflows/e2e-test-workflow-call.yml @@ -50,7 +50,7 @@ on: relayer-type: description: "The type of relayer to use" required: false - default: "rly" + default: "hermes" type: string relayer-tag: description: "The tag to use for the relayer" diff --git a/e2e/relayer/relayer.go b/e2e/relayer/relayer.go index afa0385fb7c..3e4cb2163aa 100644 --- a/e2e/relayer/relayer.go +++ b/e2e/relayer/relayer.go @@ -15,8 +15,10 @@ const ( Rly = "rly" Hermes = "hermes" - cosmosRelayerRepository = "damiannolan/rly" //"ghcr.io/cosmos/relayer" - cosmosRelayerUser = "100:1000" // docker run -it --rm --entrypoint echo ghcr.io/cosmos/relayer "$(id -u):$(id -g)" + hermesRelayerRepository = "ghcr.io/informalsystems/hermes" + hermesRelayerUser = "1000:1000" + rlyRelayerRepository = "damiannolan/rly" //"ghcr.io/cosmos/relayer" + rlyRelayerUser = "100:1000" // docker run -it --rm --entrypoint echo ghcr.io/cosmos/relayer "$(id -u):$(id -g)" ) // Config holds configuration values for the relayer used in the tests. @@ -35,7 +37,7 @@ func New(t *testing.T, cfg Config, logger *zap.Logger, dockerClient *dockerclien case Rly: return newCosmosRelayer(t, cfg.Tag, logger, dockerClient, network) case Hermes: - return newHermesRelayer() + return newHermesRelayer(t, cfg.Tag, logger, dockerClient, network) default: panic(fmt.Sprintf("unknown relayer specified: %s", cfg.Type)) } @@ -44,7 +46,7 @@ func New(t *testing.T, cfg Config, logger *zap.Logger, dockerClient *dockerclien // newCosmosRelayer returns an instance of the go relayer. // Options are used to allow for relayer version selection and specifying the default processing option. func newCosmosRelayer(t *testing.T, tag string, logger *zap.Logger, dockerClient *dockerclient.Client, network string) ibc.Relayer { - customImageOption := relayer.CustomDockerImage(cosmosRelayerRepository, tag, cosmosRelayerUser) + customImageOption := relayer.CustomDockerImage(rlyRelayerRepository, tag, rlyRelayerUser) relayerProcessingOption := relayer.StartupFlags("-p", "events") // relayer processes via events relayerFactory := interchaintest.NewBuiltinRelayerFactory(ibc.CosmosRly, logger, customImageOption, relayerProcessingOption) @@ -55,8 +57,13 @@ func newCosmosRelayer(t *testing.T, tag string, logger *zap.Logger, dockerClient } // newHermesRelayer returns an instance of the hermes relayer. -func newHermesRelayer() ibc.Relayer { - panic("hermes relayer not yet implemented for interchaintest") +func newHermesRelayer(t *testing.T, tag string, logger *zap.Logger, dockerClient *dockerclient.Client, network string) ibc.Relayer { + customImageOption := relayer.CustomDockerImage(hermesRelayerRepository, tag, hermesRelayerUser) + relayerFactory := interchaintest.NewBuiltinRelayerFactory(ibc.Hermes, logger, customImageOption) + + return relayerFactory.Build( + t, dockerClient, network, + ) } // RelayerMap is a mapping from test names to a relayer set for that test. diff --git a/e2e/testconfig/testconfig.go b/e2e/testconfig/testconfig.go index 88b1541b751..48e54dfb5f3 100644 --- a/e2e/testconfig/testconfig.go +++ b/e2e/testconfig/testconfig.go @@ -52,6 +52,8 @@ const ( // defaultRlyTag is the tag that will be used if no relayer tag is specified. // all images are here https://github.com/cosmos/relayer/pkgs/container/relayer/versions defaultRlyTag = "latest" // "andrew-tendermint_v0.37" // "v2.2.0" + // defaultHermesTag is the tag that will be used if no relayer tag is specified for hermes. + defaultHermesTag = "v1.4.0" // defaultChainTag is the tag that will be used for the chains if none is specified. defaultChainTag = "main" // defaultRelayerType is the default relayer that will be used if none is specified. @@ -284,7 +286,7 @@ func getRelayerConfigFromEnv() relayer.Config { rlyTag = defaultRlyTag } if relayerType == relayer.Hermes { - // TODO: set default hermes version + rlyTag = defaultHermesTag } } return relayer.Config{ From a526e8cb001ddcd79d142b912001e76f25081bd9 Mon Sep 17 00:00:00 2001 From: DimitrisJim Date: Tue, 4 Apr 2023 14:16:21 +0300 Subject: [PATCH 02/14] Hardcode the tag for testing. --- .github/workflows/e2e-test-workflow-call.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e-test-workflow-call.yml b/.github/workflows/e2e-test-workflow-call.yml index ce813b7707c..fb008d859d9 100644 --- a/.github/workflows/e2e-test-workflow-call.yml +++ b/.github/workflows/e2e-test-workflow-call.yml @@ -55,7 +55,7 @@ on: relayer-tag: description: "The tag to use for the relayer" required: false - default: "" # the tests themselves will choose a sensible default when unset. + default: "1.4.0" # the tests themselves will choose a sensible default when unset. type: string build-and-push-docker-image: description: "Flag to specify if the docker image should be built and pushed beforehand" From a4475ed367e560c86f25e58edb1157c43bc2e7b1 Mon Sep 17 00:00:00 2001 From: DimitrisJim Date: Wed, 5 Apr 2023 16:01:18 +0300 Subject: [PATCH 03/14] Point interchaintest to fork. --- e2e/dockerutil/dockerutil.go | 2 +- e2e/go.sum | 4 ++++ e2e/relayer/relayer.go | 6 +++--- e2e/testconfig/testconfig.go | 4 ++-- e2e/tests/core/03-connection/connection_test.go | 4 ++-- e2e/tests/core/client_test.go | 6 +++--- e2e/tests/interchain_accounts/base_test.go | 8 ++++---- e2e/tests/interchain_accounts/gov_test.go | 6 +++--- e2e/tests/interchain_accounts/groups_test.go | 6 +++--- e2e/tests/interchain_accounts/incentivized_test.go | 6 +++--- .../interchain_accounts/intertx_incentivized_test.go | 6 +++--- e2e/tests/interchain_accounts/intertx_test.go | 8 ++++---- e2e/tests/interchain_accounts/localhost_test.go | 6 +++--- e2e/tests/transfer/authz_test.go | 2 +- e2e/tests/transfer/base_test.go | 7 +++++-- e2e/tests/transfer/incentivized_test.go | 4 ++-- e2e/tests/transfer/localhost_test.go | 2 +- e2e/tests/upgrades/upgrade_test.go | 11 +++++++---- e2e/testsuite/diagnostics/diagnostics.go | 2 +- e2e/testsuite/testsuite.go | 2 +- 20 files changed, 56 insertions(+), 46 deletions(-) diff --git a/e2e/dockerutil/dockerutil.go b/e2e/dockerutil/dockerutil.go index 4d75f685f5e..1dc2934e513 100644 --- a/e2e/dockerutil/dockerutil.go +++ b/e2e/dockerutil/dockerutil.go @@ -22,7 +22,7 @@ func GetTestContainers(t *testing.T, ctx context.Context, dc *dockerclient.Clien testContainers, err := dc.ContainerList(ctx, dockertypes.ContainerListOptions{ All: true, Filters: filters.NewArgs( - // see: https://github.com/strangelove-ventures/interchaintest/blob/0bdc194c2aa11aa32479f32b19e1c50304301981/internal/dockerutil/setup.go#L31-L36 + // see: https://github.com/DimitrisJim/ictest/blob/0bdc194c2aa11aa32479f32b19e1c50304301981/internal/dockerutil/setup.go#L31-L36 // for the label needed to identify test containers. filters.Arg("label", testLabel+"="+t.Name()), ), diff --git a/e2e/go.sum b/e2e/go.sum index c896afd0c1a..967ff5ae7fc 100644 --- a/e2e/go.sum +++ b/e2e/go.sum @@ -219,6 +219,10 @@ github.com/ChainSafe/go-schnorrkel v1.0.0/go.mod h1:dpzHYVxLZcp8pjlV+O+UR8K0Hp/z github.com/ComposableFi/go-subkey/v2 v2.0.0-tm03420 h1:oknQF/iIhf5lVjbwjsVDzDByupRhga8nhA3NAmwyHDA= github.com/ComposableFi/go-subkey/v2 v2.0.0-tm03420/go.mod h1:KYkiMX5AbOlXXYfxkrYPrRPV6EbVUALTQh5ptUOJzu8= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/DimitrisJim/ictest/v7 v7.0.0-20230405125033-ee0c6eaf605b h1:PsOQVCHmcOwF/zvKlr1bd8Cvpx8JWOh6YL62lDlowt0= +github.com/DimitrisJim/ictest/v7 v7.0.0-20230405125033-ee0c6eaf605b/go.mod h1:zlKqLfeJ2tth4jGTok+witx87Ndap7twUPQoGWxRHqk= +github.com/DimitrisJim/ictest/v7 v7.0.0-20230405142614-dbc9eb41c342 h1:B0c7ZHgY10+YLvkbNbOgQkng3KGb8Ezu4sHQeUUjPlw= +github.com/DimitrisJim/ictest/v7 v7.0.0-20230405142614-dbc9eb41c342/go.mod h1:zlKqLfeJ2tth4jGTok+witx87Ndap7twUPQoGWxRHqk= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= diff --git a/e2e/relayer/relayer.go b/e2e/relayer/relayer.go index 3e4cb2163aa..a77a3037e47 100644 --- a/e2e/relayer/relayer.go +++ b/e2e/relayer/relayer.go @@ -4,10 +4,10 @@ import ( "fmt" "testing" + interchaintest "github.com/DimitrisJim/ictest/v7" + "github.com/DimitrisJim/ictest/v7/ibc" + "github.com/DimitrisJim/ictest/v7/relayer" dockerclient "github.com/docker/docker/client" - "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - "github.com/strangelove-ventures/interchaintest/v7/relayer" "go.uber.org/zap" ) diff --git a/e2e/testconfig/testconfig.go b/e2e/testconfig/testconfig.go index 48e54dfb5f3..ce383bb5ac9 100644 --- a/e2e/testconfig/testconfig.go +++ b/e2e/testconfig/testconfig.go @@ -7,6 +7,8 @@ import ( "path" "strings" + "github.com/DimitrisJim/ictest/v7/ibc" + interchaintestutil "github.com/DimitrisJim/ictest/v7/testutil" tmjson "github.com/cometbft/cometbft/libs/json" tmtypes "github.com/cometbft/cometbft/types" "github.com/cosmos/cosmos-sdk/codec" @@ -16,8 +18,6 @@ import ( govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - interchaintestutil "github.com/strangelove-ventures/interchaintest/v7/testutil" "gopkg.in/yaml.v2" "github.com/cosmos/ibc-go/e2e/relayer" diff --git a/e2e/tests/core/03-connection/connection_test.go b/e2e/tests/core/03-connection/connection_test.go index 1694bc2e0ce..e29b4c98da2 100644 --- a/e2e/tests/core/03-connection/connection_test.go +++ b/e2e/tests/core/03-connection/connection_test.go @@ -8,9 +8,9 @@ import ( "testing" "time" + "github.com/DimitrisJim/ictest/v7/ibc" + test "github.com/DimitrisJim/ictest/v7/testutil" paramsproposaltypes "github.com/cosmos/cosmos-sdk/x/params/types/proposal" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - test "github.com/strangelove-ventures/interchaintest/v7/testutil" "github.com/stretchr/testify/suite" "github.com/cosmos/ibc-go/e2e/testsuite" diff --git a/e2e/tests/core/client_test.go b/e2e/tests/core/client_test.go index 1f9cbb1cf4d..05f0337f94a 100644 --- a/e2e/tests/core/client_test.go +++ b/e2e/tests/core/client_test.go @@ -8,6 +8,9 @@ import ( "testing" "time" + "github.com/DimitrisJim/ictest/v7/chain/cosmos" + "github.com/DimitrisJim/ictest/v7/ibc" + test "github.com/DimitrisJim/ictest/v7/testutil" "github.com/cometbft/cometbft/crypto/tmhash" tmjson "github.com/cometbft/cometbft/libs/json" "github.com/cometbft/cometbft/privval" @@ -16,9 +19,6 @@ import ( tmtypes "github.com/cometbft/cometbft/types" tmversion "github.com/cometbft/cometbft/version" "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" - "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - test "github.com/strangelove-ventures/interchaintest/v7/testutil" "github.com/stretchr/testify/suite" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" diff --git a/e2e/tests/interchain_accounts/base_test.go b/e2e/tests/interchain_accounts/base_test.go index 53c5384be31..9dfa6721ef0 100644 --- a/e2e/tests/interchain_accounts/base_test.go +++ b/e2e/tests/interchain_accounts/base_test.go @@ -5,10 +5,10 @@ import ( "testing" "time" - "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - test "github.com/strangelove-ventures/interchaintest/v7/testutil" + interchaintest "github.com/DimitrisJim/ictest/v7" + "github.com/DimitrisJim/ictest/v7/chain/cosmos" + "github.com/DimitrisJim/ictest/v7/ibc" + test "github.com/DimitrisJim/ictest/v7/testutil" "github.com/stretchr/testify/suite" "golang.org/x/mod/semver" diff --git a/e2e/tests/interchain_accounts/gov_test.go b/e2e/tests/interchain_accounts/gov_test.go index 2f572c35596..6906755984b 100644 --- a/e2e/tests/interchain_accounts/gov_test.go +++ b/e2e/tests/interchain_accounts/gov_test.go @@ -10,9 +10,9 @@ import ( govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/cosmos/gogoproto/proto" - "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - test "github.com/strangelove-ventures/interchaintest/v7/testutil" + interchaintest "github.com/DimitrisJim/ictest/v7" + "github.com/DimitrisJim/ictest/v7/ibc" + test "github.com/DimitrisJim/ictest/v7/testutil" "github.com/stretchr/testify/suite" "github.com/cosmos/ibc-go/e2e/testsuite" diff --git a/e2e/tests/interchain_accounts/groups_test.go b/e2e/tests/interchain_accounts/groups_test.go index 7e7ad72324d..189dc3a0753 100644 --- a/e2e/tests/interchain_accounts/groups_test.go +++ b/e2e/tests/interchain_accounts/groups_test.go @@ -5,13 +5,13 @@ import ( "testing" "time" + interchaintest "github.com/DimitrisJim/ictest/v7" + "github.com/DimitrisJim/ictest/v7/ibc" + test "github.com/DimitrisJim/ictest/v7/testutil" sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" grouptypes "github.com/cosmos/cosmos-sdk/x/group" "github.com/cosmos/gogoproto/proto" - interchaintest "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - test "github.com/strangelove-ventures/interchaintest/v7/testutil" "github.com/stretchr/testify/suite" "github.com/cosmos/ibc-go/e2e/testsuite" diff --git a/e2e/tests/interchain_accounts/incentivized_test.go b/e2e/tests/interchain_accounts/incentivized_test.go index f078391ded1..01b70fafd21 100644 --- a/e2e/tests/interchain_accounts/incentivized_test.go +++ b/e2e/tests/interchain_accounts/incentivized_test.go @@ -5,12 +5,12 @@ import ( "testing" "time" + interchaintest "github.com/DimitrisJim/ictest/v7" + "github.com/DimitrisJim/ictest/v7/ibc" + test "github.com/DimitrisJim/ictest/v7/testutil" sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/gogoproto/proto" - interchaintest "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - test "github.com/strangelove-ventures/interchaintest/v7/testutil" "github.com/stretchr/testify/suite" "github.com/cosmos/ibc-go/e2e/testconfig" diff --git a/e2e/tests/interchain_accounts/intertx_incentivized_test.go b/e2e/tests/interchain_accounts/intertx_incentivized_test.go index a76ae1a990c..321ee9c6969 100644 --- a/e2e/tests/interchain_accounts/intertx_incentivized_test.go +++ b/e2e/tests/interchain_accounts/intertx_incentivized_test.go @@ -4,12 +4,12 @@ import ( "context" "testing" + interchaintest "github.com/DimitrisJim/ictest/v7" + "github.com/DimitrisJim/ictest/v7/ibc" + test "github.com/DimitrisJim/ictest/v7/testutil" sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" intertxtypes "github.com/cosmos/interchain-accounts/x/inter-tx/types" - "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - test "github.com/strangelove-ventures/interchaintest/v7/testutil" "github.com/stretchr/testify/suite" "github.com/cosmos/ibc-go/e2e/testvalues" diff --git a/e2e/tests/interchain_accounts/intertx_test.go b/e2e/tests/interchain_accounts/intertx_test.go index b70d539a55b..a2cdc3197b3 100644 --- a/e2e/tests/interchain_accounts/intertx_test.go +++ b/e2e/tests/interchain_accounts/intertx_test.go @@ -4,10 +4,10 @@ import ( "context" "testing" - "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - test "github.com/strangelove-ventures/interchaintest/v7/testutil" + interchaintest "github.com/DimitrisJim/ictest/v7" + "github.com/DimitrisJim/ictest/v7/chain/cosmos" + "github.com/DimitrisJim/ictest/v7/ibc" + test "github.com/DimitrisJim/ictest/v7/testutil" "github.com/stretchr/testify/suite" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/e2e/tests/interchain_accounts/localhost_test.go b/e2e/tests/interchain_accounts/localhost_test.go index 1b374b3ff8e..42ec00ba285 100644 --- a/e2e/tests/interchain_accounts/localhost_test.go +++ b/e2e/tests/interchain_accounts/localhost_test.go @@ -17,11 +17,11 @@ import ( ibctesting "github.com/cosmos/ibc-go/v7/testing" "github.com/stretchr/testify/suite" + interchaintest "github.com/DimitrisJim/ictest/v7" + "github.com/DimitrisJim/ictest/v7/ibc" + test "github.com/DimitrisJim/ictest/v7/testutil" "github.com/cosmos/ibc-go/e2e/testsuite" "github.com/cosmos/ibc-go/e2e/testvalues" - "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - test "github.com/strangelove-ventures/interchaintest/v7/testutil" ) func TestInterchainAccountsLocalhostTestSuite(t *testing.T) { diff --git a/e2e/tests/transfer/authz_test.go b/e2e/tests/transfer/authz_test.go index 2906122d0d0..31290c99ecb 100644 --- a/e2e/tests/transfer/authz_test.go +++ b/e2e/tests/transfer/authz_test.go @@ -4,11 +4,11 @@ import ( "context" "testing" + test "github.com/DimitrisJim/ictest/v7/testutil" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/authz" - test "github.com/strangelove-ventures/interchaintest/v7/testutil" "github.com/stretchr/testify/suite" "github.com/cosmos/ibc-go/e2e/testsuite" diff --git a/e2e/tests/transfer/base_test.go b/e2e/tests/transfer/base_test.go index 577f4a89bd1..e84c4e837af 100644 --- a/e2e/tests/transfer/base_test.go +++ b/e2e/tests/transfer/base_test.go @@ -6,10 +6,13 @@ import ( "testing" "time" +<<<<<<< HEAD // "cosmossdk.io/math" +======= + "github.com/DimitrisJim/ictest/v7/ibc" + test "github.com/DimitrisJim/ictest/v7/testutil" +>>>>>>> f44dd9ae (Point interchaintest to fork.) paramsproposaltypes "github.com/cosmos/cosmos-sdk/x/params/types/proposal" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - test "github.com/strangelove-ventures/interchaintest/v7/testutil" "github.com/stretchr/testify/suite" "github.com/cosmos/ibc-go/e2e/semverutil" diff --git a/e2e/tests/transfer/incentivized_test.go b/e2e/tests/transfer/incentivized_test.go index 7da6e7b5c5d..22632bb0a0a 100644 --- a/e2e/tests/transfer/incentivized_test.go +++ b/e2e/tests/transfer/incentivized_test.go @@ -5,9 +5,9 @@ import ( "testing" "time" + "github.com/DimitrisJim/ictest/v7/ibc" + test "github.com/DimitrisJim/ictest/v7/testutil" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - test "github.com/strangelove-ventures/interchaintest/v7/testutil" "github.com/stretchr/testify/suite" "github.com/cosmos/ibc-go/e2e/testvalues" diff --git a/e2e/tests/transfer/localhost_test.go b/e2e/tests/transfer/localhost_test.go index af42a1c3488..8b4de25a305 100644 --- a/e2e/tests/transfer/localhost_test.go +++ b/e2e/tests/transfer/localhost_test.go @@ -6,13 +6,13 @@ import ( "github.com/stretchr/testify/suite" + test "github.com/DimitrisJim/ictest/v7/testutil" transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" "github.com/cosmos/ibc-go/v7/modules/core/exported" localhost "github.com/cosmos/ibc-go/v7/modules/light-clients/09-localhost" ibctesting "github.com/cosmos/ibc-go/v7/testing" - test "github.com/strangelove-ventures/interchaintest/v7/testutil" "github.com/cosmos/ibc-go/e2e/testsuite" "github.com/cosmos/ibc-go/e2e/testvalues" diff --git a/e2e/tests/upgrades/upgrade_test.go b/e2e/tests/upgrades/upgrade_test.go index b51adb601a7..52ea6993545 100644 --- a/e2e/tests/upgrades/upgrade_test.go +++ b/e2e/tests/upgrades/upgrade_test.go @@ -6,16 +6,19 @@ import ( "testing" "time" +<<<<<<< HEAD "cosmossdk.io/math" +======= + interchaintest "github.com/DimitrisJim/ictest/v7" + "github.com/DimitrisJim/ictest/v7/chain/cosmos" + "github.com/DimitrisJim/ictest/v7/ibc" + test "github.com/DimitrisJim/ictest/v7/testutil" +>>>>>>> f44dd9ae (Point interchaintest to fork.) sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" "github.com/cosmos/gogoproto/proto" intertxtypes "github.com/cosmos/interchain-accounts/x/inter-tx/types" - interchaintest "github.com/strangelove-ventures/interchaintest/v7" - "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" - "github.com/strangelove-ventures/interchaintest/v7/ibc" - test "github.com/strangelove-ventures/interchaintest/v7/testutil" "github.com/stretchr/testify/suite" "golang.org/x/mod/semver" diff --git a/e2e/testsuite/diagnostics/diagnostics.go b/e2e/testsuite/diagnostics/diagnostics.go index 72ae0960250..1614364e882 100644 --- a/e2e/testsuite/diagnostics/diagnostics.go +++ b/e2e/testsuite/diagnostics/diagnostics.go @@ -9,9 +9,9 @@ import ( "strings" "testing" + "github.com/DimitrisJim/ictest/v7/ibc" dockertypes "github.com/docker/docker/api/types" dockerclient "github.com/docker/docker/client" - "github.com/strangelove-ventures/interchaintest/v7/ibc" "github.com/cosmos/ibc-go/e2e/dockerutil" "github.com/cosmos/ibc-go/e2e/testconfig" diff --git a/e2e/testsuite/testsuite.go b/e2e/testsuite/testsuite.go index f905a2225b2..9e6b0ac748b 100644 --- a/e2e/testsuite/testsuite.go +++ b/e2e/testsuite/testsuite.go @@ -142,7 +142,7 @@ func (s *E2ETestSuite) SetupChainsRelayerAndChannel(ctx context.Context, channel // SetupSingleChain creates and returns a single CosmosChain for usage in e2e tests. // This is useful for testing single chain functionality when performing coordinated upgrades as well as testing localhost ibc client functionality. // TODO: Actually setup a single chain. Seeing panic: runtime error: index out of range [0] with length 0 when using a single chain. -// issue: https://github.com/strangelove-ventures/interchaintest/issues/401 +// issue: https://github.com/DimitrisJim/ictest/issues/401 func (s *E2ETestSuite) SetupSingleChain(ctx context.Context) *cosmos.CosmosChain { chainA, chainB := s.GetChains() From f747125326e6c5b73a086496153e873806138fd6 Mon Sep 17 00:00:00 2001 From: DimitrisJim Date: Thu, 6 Apr 2023 10:14:24 +0300 Subject: [PATCH 04/14] Add delays after interchain account registration. --- e2e/tests/interchain_accounts/base_test.go | 9 +++++++++ e2e/tests/interchain_accounts/incentivized_test.go | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/e2e/tests/interchain_accounts/base_test.go b/e2e/tests/interchain_accounts/base_test.go index 9dfa6721ef0..4ca4f6f4ac9 100644 --- a/e2e/tests/interchain_accounts/base_test.go +++ b/e2e/tests/interchain_accounts/base_test.go @@ -81,6 +81,9 @@ func (s *InterchainAccountsTestSuite) TestMsgSendTx_SuccessfulTransfer() { s.StartRelayer(relayer) }) + // Wait for a couple of blocks to ensure channel handshake is complete + s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") + t.Run("verify interchain account", func(t *testing.T) { var err error hostAccount, err = s.QueryInterchainAccount(ctx, chainA, controllerAddress, ibctesting.FirstConnectionID) @@ -178,6 +181,9 @@ func (s *InterchainAccountsTestSuite) TestMsgSendTx_FailedTransfer_InsufficientF s.StartRelayer(relayer) }) + // Wait for a couple of blocks to ensure channel handshake is complete + s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") + t.Run("verify interchain account", func(t *testing.T) { var err error hostAccount, err = s.QueryInterchainAccount(ctx, chainA, controllerAddress, ibctesting.FirstConnectionID) @@ -275,6 +281,9 @@ func (s *InterchainAccountsTestSuite) TestMsgSubmitTx_SuccessfulTransfer_AfterRe s.StartRelayer(relayer) }) + // Wait for a couple of blocks to ensure channel handshake is complete + s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") + t.Run("verify interchain account", func(t *testing.T) { var err error hostAccount, err = s.QueryInterchainAccount(ctx, chainA, controllerAddress, ibctesting.FirstConnectionID) diff --git a/e2e/tests/interchain_accounts/incentivized_test.go b/e2e/tests/interchain_accounts/incentivized_test.go index 01b70fafd21..6711ce2afc1 100644 --- a/e2e/tests/interchain_accounts/incentivized_test.go +++ b/e2e/tests/interchain_accounts/incentivized_test.go @@ -78,6 +78,9 @@ func (s *IncentivizedInterchainAccountsTestSuite) TestMsgSendTx_SuccessfulBankSe s.StartRelayer(relayer) }) + // Wait for a couple of blocks to ensure channel handshake is complete + s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") + var channelOutput ibc.ChannelOutput t.Run("verify interchain account", func(t *testing.T) { var err error @@ -259,6 +262,9 @@ func (s *IncentivizedInterchainAccountsTestSuite) TestMsgSendTx_FailedBankSend_I s.StartRelayer(relayer) }) + // Wait for a couple of blocks to ensure channel handshake is complete + s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") + var channelOutput ibc.ChannelOutput t.Run("verify interchain account", func(t *testing.T) { var err error From ea3518783774cfc439a34c268b8a2aef7d65eed4 Mon Sep 17 00:00:00 2001 From: DimitrisJim Date: Thu, 6 Apr 2023 10:50:51 +0300 Subject: [PATCH 05/14] Add additional delays to failing tests. --- e2e/tests/interchain_accounts/groups_test.go | 2 ++ e2e/tests/transfer/base_test.go | 6 ++++++ e2e/tests/transfer/incentivized_test.go | 6 ++++++ 3 files changed, 14 insertions(+) diff --git a/e2e/tests/interchain_accounts/groups_test.go b/e2e/tests/interchain_accounts/groups_test.go index 189dc3a0753..9377560a04e 100644 --- a/e2e/tests/interchain_accounts/groups_test.go +++ b/e2e/tests/interchain_accounts/groups_test.go @@ -137,6 +137,8 @@ func (s *InterchainAccountsGroupsTestSuite) TestInterchainAccountsGroupsIntegrat s.StartRelayer(relayer) }) + s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") + t.Run("verify interchain account registration success", func(t *testing.T) { interchainAccAddr, err = s.QueryInterchainAccount(ctx, chainA, groupPolicyAddr, ibctesting.FirstConnectionID) s.Require().NotEmpty(interchainAccAddr) diff --git a/e2e/tests/transfer/base_test.go b/e2e/tests/transfer/base_test.go index e84c4e837af..f5d5d049cfe 100644 --- a/e2e/tests/transfer/base_test.go +++ b/e2e/tests/transfer/base_test.go @@ -104,6 +104,8 @@ func (s *TransferTestSuite) TestMsgTransfer_Succeeds_Nonincentivized() { s.StartRelayer(relayer) }) + s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") + chainBIBCToken := testsuite.GetIBCToken(chainADenom, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID) t.Run("packets are relayed", func(t *testing.T) { @@ -186,6 +188,8 @@ func (s *TransferTestSuite) TestMsgTransfer_Fails_InvalidAddress() { s.StartRelayer(relayer) }) + s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") + t.Run("packets are relayed", func(t *testing.T) { s.AssertPacketRelayed(ctx, chainA, channelA.PortID, channelA.ChannelID, 1) }) @@ -389,6 +393,8 @@ func (s *TransferTestSuite) TestReceiveEnabledParam() { s.StartRelayer(relayer) }) + s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") + t.Run("tokens are unescrowed in failed acknowledgement", func(t *testing.T) { actualBalance, err := s.GetChainBNativeBalance(ctx, chainBWallet) s.Require().NoError(err) diff --git a/e2e/tests/transfer/incentivized_test.go b/e2e/tests/transfer/incentivized_test.go index 22632bb0a0a..0ec1d2e35ec 100644 --- a/e2e/tests/transfer/incentivized_test.go +++ b/e2e/tests/transfer/incentivized_test.go @@ -127,6 +127,8 @@ func (s *IncentivizedTransferTestSuite) TestMsgPayPacketFee_AsyncSingleSender_Su s.StartRelayer(relayer) }) + s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") + t.Run("packets are relayed", func(t *testing.T) { packets, err := s.QueryIncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) s.Require().NoError(err) @@ -243,6 +245,8 @@ func (s *IncentivizedTransferTestSuite) TestMsgPayPacketFee_InvalidReceiverAccou s.StartRelayer(relayer) }) + s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") + t.Run("packets are relayed", func(t *testing.T) { packets, err := s.QueryIncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) s.Require().NoError(err) @@ -709,6 +713,8 @@ func (s *IncentivizedTransferTestSuite) TestMsgPayPacketFee_AsyncMultipleSenders s.StartRelayer(relayer) }) + s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") + t.Run("packets are relayed", func(t *testing.T) { packets, err := s.QueryIncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) s.Require().NoError(err) From bf9252d3f968fc728caa4c1ebb217339dd47b1c9 Mon Sep 17 00:00:00 2001 From: DimitrisJim Date: Sun, 9 Apr 2023 15:35:16 +0300 Subject: [PATCH 06/14] Update fork; add a wait in MsgPayPacketFeeSingleSender. --- e2e/go.sum | 2 ++ e2e/tests/transfer/incentivized_test.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/e2e/go.sum b/e2e/go.sum index 967ff5ae7fc..d6f6bfcb4fb 100644 --- a/e2e/go.sum +++ b/e2e/go.sum @@ -223,6 +223,8 @@ github.com/DimitrisJim/ictest/v7 v7.0.0-20230405125033-ee0c6eaf605b h1:PsOQVCHmc github.com/DimitrisJim/ictest/v7 v7.0.0-20230405125033-ee0c6eaf605b/go.mod h1:zlKqLfeJ2tth4jGTok+witx87Ndap7twUPQoGWxRHqk= github.com/DimitrisJim/ictest/v7 v7.0.0-20230405142614-dbc9eb41c342 h1:B0c7ZHgY10+YLvkbNbOgQkng3KGb8Ezu4sHQeUUjPlw= github.com/DimitrisJim/ictest/v7 v7.0.0-20230405142614-dbc9eb41c342/go.mod h1:zlKqLfeJ2tth4jGTok+witx87Ndap7twUPQoGWxRHqk= +github.com/DimitrisJim/ictest/v7 v7.0.0-20230409123202-20e118151417 h1:Uvma3O3RoMJ3qLYtZ2jan9wxYNK3KxpBSv5q/uB2GA0= +github.com/DimitrisJim/ictest/v7 v7.0.0-20230409123202-20e118151417/go.mod h1:zlKqLfeJ2tth4jGTok+witx87Ndap7twUPQoGWxRHqk= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= diff --git a/e2e/tests/transfer/incentivized_test.go b/e2e/tests/transfer/incentivized_test.go index 0ec1d2e35ec..3b2f4bdd1f4 100644 --- a/e2e/tests/transfer/incentivized_test.go +++ b/e2e/tests/transfer/incentivized_test.go @@ -351,6 +351,8 @@ func (s *IncentivizedTransferTestSuite) TestMultiMsg_MsgPayPacketFeeSingleSender s.StartRelayer(relayer) }) + s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") + t.Run("packets are relayed", func(t *testing.T) { packets, err := s.QueryIncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) s.Require().NoError(err) From 3fb3004a1d530cb888dfdad02e85f5c8fe8864fb Mon Sep 17 00:00:00 2001 From: DimitrisJim Date: Wed, 26 Apr 2023 23:27:29 +0300 Subject: [PATCH 07/14] Point back to interchaintest. --- e2e/dockerutil/dockerutil.go | 2 +- e2e/relayer/relayer.go | 6 +++--- e2e/testconfig/testconfig.go | 4 ++-- e2e/tests/core/03-connection/connection_test.go | 4 ++-- e2e/tests/core/client_test.go | 6 +++--- e2e/tests/interchain_accounts/base_test.go | 8 ++++---- e2e/tests/interchain_accounts/gov_test.go | 6 +++--- e2e/tests/interchain_accounts/groups_test.go | 6 +++--- e2e/tests/interchain_accounts/incentivized_test.go | 6 +++--- .../interchain_accounts/intertx_incentivized_test.go | 6 +++--- e2e/tests/interchain_accounts/intertx_test.go | 8 ++++---- e2e/tests/interchain_accounts/localhost_test.go | 6 +++--- e2e/tests/transfer/authz_test.go | 2 +- e2e/tests/transfer/base_test.go | 7 ++----- e2e/tests/transfer/incentivized_test.go | 4 ++-- e2e/tests/transfer/localhost_test.go | 2 +- e2e/tests/upgrades/upgrade_test.go | 11 ++++------- e2e/testsuite/diagnostics/diagnostics.go | 2 +- e2e/testsuite/testsuite.go | 2 +- 19 files changed, 46 insertions(+), 52 deletions(-) diff --git a/e2e/dockerutil/dockerutil.go b/e2e/dockerutil/dockerutil.go index 1dc2934e513..4d75f685f5e 100644 --- a/e2e/dockerutil/dockerutil.go +++ b/e2e/dockerutil/dockerutil.go @@ -22,7 +22,7 @@ func GetTestContainers(t *testing.T, ctx context.Context, dc *dockerclient.Clien testContainers, err := dc.ContainerList(ctx, dockertypes.ContainerListOptions{ All: true, Filters: filters.NewArgs( - // see: https://github.com/DimitrisJim/ictest/blob/0bdc194c2aa11aa32479f32b19e1c50304301981/internal/dockerutil/setup.go#L31-L36 + // see: https://github.com/strangelove-ventures/interchaintest/blob/0bdc194c2aa11aa32479f32b19e1c50304301981/internal/dockerutil/setup.go#L31-L36 // for the label needed to identify test containers. filters.Arg("label", testLabel+"="+t.Name()), ), diff --git a/e2e/relayer/relayer.go b/e2e/relayer/relayer.go index a77a3037e47..c3f58c062c8 100644 --- a/e2e/relayer/relayer.go +++ b/e2e/relayer/relayer.go @@ -4,10 +4,10 @@ import ( "fmt" "testing" - interchaintest "github.com/DimitrisJim/ictest/v7" - "github.com/DimitrisJim/ictest/v7/ibc" - "github.com/DimitrisJim/ictest/v7/relayer" dockerclient "github.com/docker/docker/client" + interchaintest "github.com/strangelove-ventures/interchaintest/v7" + "github.com/strangelove-ventures/interchaintest/v7/ibc" + "github.com/strangelove-ventures/interchaintest/v7/relayer" "go.uber.org/zap" ) diff --git a/e2e/testconfig/testconfig.go b/e2e/testconfig/testconfig.go index ce383bb5ac9..48e54dfb5f3 100644 --- a/e2e/testconfig/testconfig.go +++ b/e2e/testconfig/testconfig.go @@ -7,8 +7,6 @@ import ( "path" "strings" - "github.com/DimitrisJim/ictest/v7/ibc" - interchaintestutil "github.com/DimitrisJim/ictest/v7/testutil" tmjson "github.com/cometbft/cometbft/libs/json" tmtypes "github.com/cometbft/cometbft/types" "github.com/cosmos/cosmos-sdk/codec" @@ -18,6 +16,8 @@ import ( govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" + "github.com/strangelove-ventures/interchaintest/v7/ibc" + interchaintestutil "github.com/strangelove-ventures/interchaintest/v7/testutil" "gopkg.in/yaml.v2" "github.com/cosmos/ibc-go/e2e/relayer" diff --git a/e2e/tests/core/03-connection/connection_test.go b/e2e/tests/core/03-connection/connection_test.go index e29b4c98da2..1694bc2e0ce 100644 --- a/e2e/tests/core/03-connection/connection_test.go +++ b/e2e/tests/core/03-connection/connection_test.go @@ -8,9 +8,9 @@ import ( "testing" "time" - "github.com/DimitrisJim/ictest/v7/ibc" - test "github.com/DimitrisJim/ictest/v7/testutil" paramsproposaltypes "github.com/cosmos/cosmos-sdk/x/params/types/proposal" + "github.com/strangelove-ventures/interchaintest/v7/ibc" + test "github.com/strangelove-ventures/interchaintest/v7/testutil" "github.com/stretchr/testify/suite" "github.com/cosmos/ibc-go/e2e/testsuite" diff --git a/e2e/tests/core/client_test.go b/e2e/tests/core/client_test.go index 05f0337f94a..1f9cbb1cf4d 100644 --- a/e2e/tests/core/client_test.go +++ b/e2e/tests/core/client_test.go @@ -8,9 +8,6 @@ import ( "testing" "time" - "github.com/DimitrisJim/ictest/v7/chain/cosmos" - "github.com/DimitrisJim/ictest/v7/ibc" - test "github.com/DimitrisJim/ictest/v7/testutil" "github.com/cometbft/cometbft/crypto/tmhash" tmjson "github.com/cometbft/cometbft/libs/json" "github.com/cometbft/cometbft/privval" @@ -19,6 +16,9 @@ import ( tmtypes "github.com/cometbft/cometbft/types" tmversion "github.com/cometbft/cometbft/version" "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" + "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" + "github.com/strangelove-ventures/interchaintest/v7/ibc" + test "github.com/strangelove-ventures/interchaintest/v7/testutil" "github.com/stretchr/testify/suite" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" diff --git a/e2e/tests/interchain_accounts/base_test.go b/e2e/tests/interchain_accounts/base_test.go index 4ca4f6f4ac9..45c7173ef45 100644 --- a/e2e/tests/interchain_accounts/base_test.go +++ b/e2e/tests/interchain_accounts/base_test.go @@ -5,10 +5,10 @@ import ( "testing" "time" - interchaintest "github.com/DimitrisJim/ictest/v7" - "github.com/DimitrisJim/ictest/v7/chain/cosmos" - "github.com/DimitrisJim/ictest/v7/ibc" - test "github.com/DimitrisJim/ictest/v7/testutil" + interchaintest "github.com/strangelove-ventures/interchaintest/v7" + "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" + "github.com/strangelove-ventures/interchaintest/v7/ibc" + test "github.com/strangelove-ventures/interchaintest/v7/testutil" "github.com/stretchr/testify/suite" "golang.org/x/mod/semver" diff --git a/e2e/tests/interchain_accounts/gov_test.go b/e2e/tests/interchain_accounts/gov_test.go index 6906755984b..4b600586d19 100644 --- a/e2e/tests/interchain_accounts/gov_test.go +++ b/e2e/tests/interchain_accounts/gov_test.go @@ -10,9 +10,9 @@ import ( govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/cosmos/gogoproto/proto" - interchaintest "github.com/DimitrisJim/ictest/v7" - "github.com/DimitrisJim/ictest/v7/ibc" - test "github.com/DimitrisJim/ictest/v7/testutil" + interchaintest "github.com/strangelove-ventures/interchaintest/v7" + "github.com/strangelove-ventures/interchaintest/v7/ibc" + test "github.com/strangelove-ventures/interchaintest/v7/testutil" "github.com/stretchr/testify/suite" "github.com/cosmos/ibc-go/e2e/testsuite" diff --git a/e2e/tests/interchain_accounts/groups_test.go b/e2e/tests/interchain_accounts/groups_test.go index 9377560a04e..ed5c77c2ca6 100644 --- a/e2e/tests/interchain_accounts/groups_test.go +++ b/e2e/tests/interchain_accounts/groups_test.go @@ -5,13 +5,13 @@ import ( "testing" "time" - interchaintest "github.com/DimitrisJim/ictest/v7" - "github.com/DimitrisJim/ictest/v7/ibc" - test "github.com/DimitrisJim/ictest/v7/testutil" sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" grouptypes "github.com/cosmos/cosmos-sdk/x/group" "github.com/cosmos/gogoproto/proto" + interchaintest "github.com/strangelove-ventures/interchaintest/v7" + "github.com/strangelove-ventures/interchaintest/v7/ibc" + test "github.com/strangelove-ventures/interchaintest/v7/testutil" "github.com/stretchr/testify/suite" "github.com/cosmos/ibc-go/e2e/testsuite" diff --git a/e2e/tests/interchain_accounts/incentivized_test.go b/e2e/tests/interchain_accounts/incentivized_test.go index 6711ce2afc1..cc5918ce86a 100644 --- a/e2e/tests/interchain_accounts/incentivized_test.go +++ b/e2e/tests/interchain_accounts/incentivized_test.go @@ -5,12 +5,12 @@ import ( "testing" "time" - interchaintest "github.com/DimitrisJim/ictest/v7" - "github.com/DimitrisJim/ictest/v7/ibc" - test "github.com/DimitrisJim/ictest/v7/testutil" sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/gogoproto/proto" + interchaintest "github.com/strangelove-ventures/interchaintest/v7" + "github.com/strangelove-ventures/interchaintest/v7/ibc" + test "github.com/strangelove-ventures/interchaintest/v7/testutil" "github.com/stretchr/testify/suite" "github.com/cosmos/ibc-go/e2e/testconfig" diff --git a/e2e/tests/interchain_accounts/intertx_incentivized_test.go b/e2e/tests/interchain_accounts/intertx_incentivized_test.go index 321ee9c6969..74cda8db887 100644 --- a/e2e/tests/interchain_accounts/intertx_incentivized_test.go +++ b/e2e/tests/interchain_accounts/intertx_incentivized_test.go @@ -4,12 +4,12 @@ import ( "context" "testing" - interchaintest "github.com/DimitrisJim/ictest/v7" - "github.com/DimitrisJim/ictest/v7/ibc" - test "github.com/DimitrisJim/ictest/v7/testutil" sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" intertxtypes "github.com/cosmos/interchain-accounts/x/inter-tx/types" + interchaintest "github.com/strangelove-ventures/interchaintest/v7" + "github.com/strangelove-ventures/interchaintest/v7/ibc" + test "github.com/strangelove-ventures/interchaintest/v7/testutil" "github.com/stretchr/testify/suite" "github.com/cosmos/ibc-go/e2e/testvalues" diff --git a/e2e/tests/interchain_accounts/intertx_test.go b/e2e/tests/interchain_accounts/intertx_test.go index a2cdc3197b3..3e9b85b5978 100644 --- a/e2e/tests/interchain_accounts/intertx_test.go +++ b/e2e/tests/interchain_accounts/intertx_test.go @@ -4,10 +4,10 @@ import ( "context" "testing" - interchaintest "github.com/DimitrisJim/ictest/v7" - "github.com/DimitrisJim/ictest/v7/chain/cosmos" - "github.com/DimitrisJim/ictest/v7/ibc" - test "github.com/DimitrisJim/ictest/v7/testutil" + interchaintest "github.com/strangelove-ventures/interchaintest/v7" + "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" + "github.com/strangelove-ventures/interchaintest/v7/ibc" + test "github.com/strangelove-ventures/interchaintest/v7/testutil" "github.com/stretchr/testify/suite" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/e2e/tests/interchain_accounts/localhost_test.go b/e2e/tests/interchain_accounts/localhost_test.go index 42ec00ba285..c06fbb53640 100644 --- a/e2e/tests/interchain_accounts/localhost_test.go +++ b/e2e/tests/interchain_accounts/localhost_test.go @@ -17,11 +17,11 @@ import ( ibctesting "github.com/cosmos/ibc-go/v7/testing" "github.com/stretchr/testify/suite" - interchaintest "github.com/DimitrisJim/ictest/v7" - "github.com/DimitrisJim/ictest/v7/ibc" - test "github.com/DimitrisJim/ictest/v7/testutil" "github.com/cosmos/ibc-go/e2e/testsuite" "github.com/cosmos/ibc-go/e2e/testvalues" + interchaintest "github.com/strangelove-ventures/interchaintest/v7" + "github.com/strangelove-ventures/interchaintest/v7/ibc" + test "github.com/strangelove-ventures/interchaintest/v7/testutil" ) func TestInterchainAccountsLocalhostTestSuite(t *testing.T) { diff --git a/e2e/tests/transfer/authz_test.go b/e2e/tests/transfer/authz_test.go index 31290c99ecb..2906122d0d0 100644 --- a/e2e/tests/transfer/authz_test.go +++ b/e2e/tests/transfer/authz_test.go @@ -4,11 +4,11 @@ import ( "context" "testing" - test "github.com/DimitrisJim/ictest/v7/testutil" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/authz" + test "github.com/strangelove-ventures/interchaintest/v7/testutil" "github.com/stretchr/testify/suite" "github.com/cosmos/ibc-go/e2e/testsuite" diff --git a/e2e/tests/transfer/base_test.go b/e2e/tests/transfer/base_test.go index f5d5d049cfe..bb52044b561 100644 --- a/e2e/tests/transfer/base_test.go +++ b/e2e/tests/transfer/base_test.go @@ -6,13 +6,10 @@ import ( "testing" "time" -<<<<<<< HEAD // "cosmossdk.io/math" -======= - "github.com/DimitrisJim/ictest/v7/ibc" - test "github.com/DimitrisJim/ictest/v7/testutil" ->>>>>>> f44dd9ae (Point interchaintest to fork.) paramsproposaltypes "github.com/cosmos/cosmos-sdk/x/params/types/proposal" + "github.com/strangelove-ventures/interchaintest/v7/ibc" + test "github.com/strangelove-ventures/interchaintest/v7/testutil" "github.com/stretchr/testify/suite" "github.com/cosmos/ibc-go/e2e/semverutil" diff --git a/e2e/tests/transfer/incentivized_test.go b/e2e/tests/transfer/incentivized_test.go index 3b2f4bdd1f4..e3c3296c0ae 100644 --- a/e2e/tests/transfer/incentivized_test.go +++ b/e2e/tests/transfer/incentivized_test.go @@ -5,9 +5,9 @@ import ( "testing" "time" - "github.com/DimitrisJim/ictest/v7/ibc" - test "github.com/DimitrisJim/ictest/v7/testutil" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/strangelove-ventures/interchaintest/v7/ibc" + test "github.com/strangelove-ventures/interchaintest/v7/testutil" "github.com/stretchr/testify/suite" "github.com/cosmos/ibc-go/e2e/testvalues" diff --git a/e2e/tests/transfer/localhost_test.go b/e2e/tests/transfer/localhost_test.go index 8b4de25a305..af42a1c3488 100644 --- a/e2e/tests/transfer/localhost_test.go +++ b/e2e/tests/transfer/localhost_test.go @@ -6,13 +6,13 @@ import ( "github.com/stretchr/testify/suite" - test "github.com/DimitrisJim/ictest/v7/testutil" transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" "github.com/cosmos/ibc-go/v7/modules/core/exported" localhost "github.com/cosmos/ibc-go/v7/modules/light-clients/09-localhost" ibctesting "github.com/cosmos/ibc-go/v7/testing" + test "github.com/strangelove-ventures/interchaintest/v7/testutil" "github.com/cosmos/ibc-go/e2e/testsuite" "github.com/cosmos/ibc-go/e2e/testvalues" diff --git a/e2e/tests/upgrades/upgrade_test.go b/e2e/tests/upgrades/upgrade_test.go index 52ea6993545..b51adb601a7 100644 --- a/e2e/tests/upgrades/upgrade_test.go +++ b/e2e/tests/upgrades/upgrade_test.go @@ -6,19 +6,16 @@ import ( "testing" "time" -<<<<<<< HEAD "cosmossdk.io/math" -======= - interchaintest "github.com/DimitrisJim/ictest/v7" - "github.com/DimitrisJim/ictest/v7/chain/cosmos" - "github.com/DimitrisJim/ictest/v7/ibc" - test "github.com/DimitrisJim/ictest/v7/testutil" ->>>>>>> f44dd9ae (Point interchaintest to fork.) sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" "github.com/cosmos/gogoproto/proto" intertxtypes "github.com/cosmos/interchain-accounts/x/inter-tx/types" + interchaintest "github.com/strangelove-ventures/interchaintest/v7" + "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" + "github.com/strangelove-ventures/interchaintest/v7/ibc" + test "github.com/strangelove-ventures/interchaintest/v7/testutil" "github.com/stretchr/testify/suite" "golang.org/x/mod/semver" diff --git a/e2e/testsuite/diagnostics/diagnostics.go b/e2e/testsuite/diagnostics/diagnostics.go index 1614364e882..72ae0960250 100644 --- a/e2e/testsuite/diagnostics/diagnostics.go +++ b/e2e/testsuite/diagnostics/diagnostics.go @@ -9,9 +9,9 @@ import ( "strings" "testing" - "github.com/DimitrisJim/ictest/v7/ibc" dockertypes "github.com/docker/docker/api/types" dockerclient "github.com/docker/docker/client" + "github.com/strangelove-ventures/interchaintest/v7/ibc" "github.com/cosmos/ibc-go/e2e/dockerutil" "github.com/cosmos/ibc-go/e2e/testconfig" diff --git a/e2e/testsuite/testsuite.go b/e2e/testsuite/testsuite.go index 9e6b0ac748b..f905a2225b2 100644 --- a/e2e/testsuite/testsuite.go +++ b/e2e/testsuite/testsuite.go @@ -142,7 +142,7 @@ func (s *E2ETestSuite) SetupChainsRelayerAndChannel(ctx context.Context, channel // SetupSingleChain creates and returns a single CosmosChain for usage in e2e tests. // This is useful for testing single chain functionality when performing coordinated upgrades as well as testing localhost ibc client functionality. // TODO: Actually setup a single chain. Seeing panic: runtime error: index out of range [0] with length 0 when using a single chain. -// issue: https://github.com/DimitrisJim/ictest/issues/401 +// issue: https://github.com/strangelove-ventures/interchaintest/issues/401 func (s *E2ETestSuite) SetupSingleChain(ctx context.Context) *cosmos.CosmosChain { chainA, chainB := s.GetChains() From efb2244b8560fa5b7b34aa742496d810352b0611 Mon Sep 17 00:00:00 2001 From: DimitrisJim Date: Wed, 26 Apr 2023 23:51:11 +0300 Subject: [PATCH 08/14] Remove import identifiers for interchaintest when not needed. --- e2e/relayer/relayer.go | 2 +- e2e/tests/interchain_accounts/base_test.go | 2 +- e2e/tests/interchain_accounts/gov_test.go | 2 +- e2e/tests/interchain_accounts/intertx_incentivized_test.go | 2 +- e2e/tests/interchain_accounts/intertx_test.go | 2 +- e2e/tests/interchain_accounts/localhost_test.go | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/e2e/relayer/relayer.go b/e2e/relayer/relayer.go index c3f58c062c8..3e4cb2163aa 100644 --- a/e2e/relayer/relayer.go +++ b/e2e/relayer/relayer.go @@ -5,7 +5,7 @@ import ( "testing" dockerclient "github.com/docker/docker/client" - interchaintest "github.com/strangelove-ventures/interchaintest/v7" + "github.com/strangelove-ventures/interchaintest/v7" "github.com/strangelove-ventures/interchaintest/v7/ibc" "github.com/strangelove-ventures/interchaintest/v7/relayer" "go.uber.org/zap" diff --git a/e2e/tests/interchain_accounts/base_test.go b/e2e/tests/interchain_accounts/base_test.go index 45c7173ef45..b40fbd15d69 100644 --- a/e2e/tests/interchain_accounts/base_test.go +++ b/e2e/tests/interchain_accounts/base_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - interchaintest "github.com/strangelove-ventures/interchaintest/v7" + "github.com/strangelove-ventures/interchaintest/v7" "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" "github.com/strangelove-ventures/interchaintest/v7/ibc" test "github.com/strangelove-ventures/interchaintest/v7/testutil" diff --git a/e2e/tests/interchain_accounts/gov_test.go b/e2e/tests/interchain_accounts/gov_test.go index 4b600586d19..2f572c35596 100644 --- a/e2e/tests/interchain_accounts/gov_test.go +++ b/e2e/tests/interchain_accounts/gov_test.go @@ -10,7 +10,7 @@ import ( govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/cosmos/gogoproto/proto" - interchaintest "github.com/strangelove-ventures/interchaintest/v7" + "github.com/strangelove-ventures/interchaintest/v7" "github.com/strangelove-ventures/interchaintest/v7/ibc" test "github.com/strangelove-ventures/interchaintest/v7/testutil" "github.com/stretchr/testify/suite" diff --git a/e2e/tests/interchain_accounts/intertx_incentivized_test.go b/e2e/tests/interchain_accounts/intertx_incentivized_test.go index 74cda8db887..a76ae1a990c 100644 --- a/e2e/tests/interchain_accounts/intertx_incentivized_test.go +++ b/e2e/tests/interchain_accounts/intertx_incentivized_test.go @@ -7,7 +7,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" intertxtypes "github.com/cosmos/interchain-accounts/x/inter-tx/types" - interchaintest "github.com/strangelove-ventures/interchaintest/v7" + "github.com/strangelove-ventures/interchaintest/v7" "github.com/strangelove-ventures/interchaintest/v7/ibc" test "github.com/strangelove-ventures/interchaintest/v7/testutil" "github.com/stretchr/testify/suite" diff --git a/e2e/tests/interchain_accounts/intertx_test.go b/e2e/tests/interchain_accounts/intertx_test.go index 3e9b85b5978..b70d539a55b 100644 --- a/e2e/tests/interchain_accounts/intertx_test.go +++ b/e2e/tests/interchain_accounts/intertx_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - interchaintest "github.com/strangelove-ventures/interchaintest/v7" + "github.com/strangelove-ventures/interchaintest/v7" "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" "github.com/strangelove-ventures/interchaintest/v7/ibc" test "github.com/strangelove-ventures/interchaintest/v7/testutil" diff --git a/e2e/tests/interchain_accounts/localhost_test.go b/e2e/tests/interchain_accounts/localhost_test.go index c06fbb53640..1b374b3ff8e 100644 --- a/e2e/tests/interchain_accounts/localhost_test.go +++ b/e2e/tests/interchain_accounts/localhost_test.go @@ -19,7 +19,7 @@ import ( "github.com/cosmos/ibc-go/e2e/testsuite" "github.com/cosmos/ibc-go/e2e/testvalues" - interchaintest "github.com/strangelove-ventures/interchaintest/v7" + "github.com/strangelove-ventures/interchaintest/v7" "github.com/strangelove-ventures/interchaintest/v7/ibc" test "github.com/strangelove-ventures/interchaintest/v7/testutil" ) From 394e531b160b18f98b6ce07ceb2d9aa22aeda7c5 Mon Sep 17 00:00:00 2001 From: DimitrisJim Date: Thu, 27 Apr 2023 00:03:32 +0300 Subject: [PATCH 09/14] Manually clean up go.sum's entries for the fork. The fork struggle is finally over. --- e2e/go.sum | 6 ------ 1 file changed, 6 deletions(-) diff --git a/e2e/go.sum b/e2e/go.sum index d6f6bfcb4fb..c896afd0c1a 100644 --- a/e2e/go.sum +++ b/e2e/go.sum @@ -219,12 +219,6 @@ github.com/ChainSafe/go-schnorrkel v1.0.0/go.mod h1:dpzHYVxLZcp8pjlV+O+UR8K0Hp/z github.com/ComposableFi/go-subkey/v2 v2.0.0-tm03420 h1:oknQF/iIhf5lVjbwjsVDzDByupRhga8nhA3NAmwyHDA= github.com/ComposableFi/go-subkey/v2 v2.0.0-tm03420/go.mod h1:KYkiMX5AbOlXXYfxkrYPrRPV6EbVUALTQh5ptUOJzu8= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/DimitrisJim/ictest/v7 v7.0.0-20230405125033-ee0c6eaf605b h1:PsOQVCHmcOwF/zvKlr1bd8Cvpx8JWOh6YL62lDlowt0= -github.com/DimitrisJim/ictest/v7 v7.0.0-20230405125033-ee0c6eaf605b/go.mod h1:zlKqLfeJ2tth4jGTok+witx87Ndap7twUPQoGWxRHqk= -github.com/DimitrisJim/ictest/v7 v7.0.0-20230405142614-dbc9eb41c342 h1:B0c7ZHgY10+YLvkbNbOgQkng3KGb8Ezu4sHQeUUjPlw= -github.com/DimitrisJim/ictest/v7 v7.0.0-20230405142614-dbc9eb41c342/go.mod h1:zlKqLfeJ2tth4jGTok+witx87Ndap7twUPQoGWxRHqk= -github.com/DimitrisJim/ictest/v7 v7.0.0-20230409123202-20e118151417 h1:Uvma3O3RoMJ3qLYtZ2jan9wxYNK3KxpBSv5q/uB2GA0= -github.com/DimitrisJim/ictest/v7 v7.0.0-20230409123202-20e118151417/go.mod h1:zlKqLfeJ2tth4jGTok+witx87Ndap7twUPQoGWxRHqk= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= From 4e0db76a08717e86ae4c48482573400089aa86e2 Mon Sep 17 00:00:00 2001 From: DimitrisJim Date: Thu, 27 Apr 2023 14:56:16 +0300 Subject: [PATCH 10/14] Add additional waiting for blocks before querying for packets. --- e2e/tests/interchain_accounts/incentivized_test.go | 2 ++ e2e/tests/transfer/incentivized_test.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/e2e/tests/interchain_accounts/incentivized_test.go b/e2e/tests/interchain_accounts/incentivized_test.go index cc5918ce86a..ebe869e3dcb 100644 --- a/e2e/tests/interchain_accounts/incentivized_test.go +++ b/e2e/tests/interchain_accounts/incentivized_test.go @@ -354,6 +354,8 @@ func (s *IncentivizedInterchainAccountsTestSuite) TestMsgSendTx_FailedBankSend_I s.StartRelayer(relayer) }) + s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") + t.Run("packets are relayed", func(t *testing.T) { packets, err := s.QueryIncentivizedPacketsForChannel(ctx, chainA, channelOutput.PortID, channelOutput.ChannelID) s.Require().NoError(err) diff --git a/e2e/tests/transfer/incentivized_test.go b/e2e/tests/transfer/incentivized_test.go index e3c3296c0ae..861e6c2836a 100644 --- a/e2e/tests/transfer/incentivized_test.go +++ b/e2e/tests/transfer/incentivized_test.go @@ -577,6 +577,8 @@ func (s *IncentivizedTransferTestSuite) TestPayPacketFeeAsync_SingleSender_NoCou s.StartRelayer(relayer) }) + s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA), "failed to wait for blocks") + t.Run("with no counterparty address", func(t *testing.T) { t.Run("packets are relayed", func(t *testing.T) { packets, err := s.QueryIncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) From 77bc38dfe837867a56ebcb78db21acdfb03b82af Mon Sep 17 00:00:00 2001 From: DimitrisJim Date: Mon, 15 May 2023 11:14:21 +0300 Subject: [PATCH 11/14] Add a wait for the packets in additional places. --- e2e/tests/interchain_accounts/incentivized_test.go | 2 ++ e2e/tests/transfer/base_test.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/e2e/tests/interchain_accounts/incentivized_test.go b/e2e/tests/interchain_accounts/incentivized_test.go index ebe869e3dcb..d43e371cd9c 100644 --- a/e2e/tests/interchain_accounts/incentivized_test.go +++ b/e2e/tests/interchain_accounts/incentivized_test.go @@ -179,6 +179,8 @@ func (s *IncentivizedInterchainAccountsTestSuite) TestMsgSendTx_SuccessfulBankSe s.StartRelayer(relayer) }) + s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") + t.Run("packets are relayed", func(t *testing.T) { packets, err := s.QueryIncentivizedPacketsForChannel(ctx, chainA, channelOutput.PortID, channelOutput.ChannelID) s.Require().NoError(err) diff --git a/e2e/tests/transfer/base_test.go b/e2e/tests/transfer/base_test.go index 2b1f6a1b284..a3c5bc59bf9 100644 --- a/e2e/tests/transfer/base_test.go +++ b/e2e/tests/transfer/base_test.go @@ -470,6 +470,8 @@ func (s *TransferTestSuite) TestMsgTransfer_WithMemo() { s.StartRelayer(relayer) }) + s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") + chainBIBCToken := testsuite.GetIBCToken(chainADenom, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID) t.Run("packets relayed", func(t *testing.T) { From b56a20e60696844fc36ab0a905277597f53b8b2c Mon Sep 17 00:00:00 2001 From: DimitrisJim Date: Thu, 1 Jun 2023 12:40:26 +0300 Subject: [PATCH 12/14] Move waiting for blocks in the start relayer function. --- e2e/tests/interchain_accounts/base_test.go | 9 --------- e2e/tests/interchain_accounts/groups_test.go | 2 -- e2e/tests/interchain_accounts/incentivized_test.go | 10 ---------- e2e/tests/transfer/base_test.go | 8 -------- e2e/tests/transfer/incentivized_test.go | 10 ---------- e2e/testsuite/testsuite.go | 2 ++ 6 files changed, 2 insertions(+), 39 deletions(-) diff --git a/e2e/tests/interchain_accounts/base_test.go b/e2e/tests/interchain_accounts/base_test.go index cbff1f40274..fbfdc886797 100644 --- a/e2e/tests/interchain_accounts/base_test.go +++ b/e2e/tests/interchain_accounts/base_test.go @@ -66,9 +66,6 @@ func (s *InterchainAccountsTestSuite) TestMsgSendTx_SuccessfulTransfer() { s.StartRelayer(relayer) }) - // Wait for a couple of blocks to ensure channel handshake is complete - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") - t.Run("verify interchain account", func(t *testing.T) { var err error hostAccount, err = s.QueryInterchainAccount(ctx, chainA, controllerAddress, ibctesting.FirstConnectionID) @@ -165,9 +162,6 @@ func (s *InterchainAccountsTestSuite) TestMsgSendTx_FailedTransfer_InsufficientF s.StartRelayer(relayer) }) - // Wait for a couple of blocks to ensure channel handshake is complete - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") - t.Run("verify interchain account", func(t *testing.T) { var err error hostAccount, err = s.QueryInterchainAccount(ctx, chainA, controllerAddress, ibctesting.FirstConnectionID) @@ -265,9 +259,6 @@ func (s *InterchainAccountsTestSuite) TestMsgSendTx_SuccessfulTransfer_AfterReop s.StartRelayer(relayer) }) - // Wait for a couple of blocks to ensure channel handshake is complete - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") - t.Run("verify interchain account", func(t *testing.T) { var err error hostAccount, err = s.QueryInterchainAccount(ctx, chainA, controllerAddress, ibctesting.FirstConnectionID) diff --git a/e2e/tests/interchain_accounts/groups_test.go b/e2e/tests/interchain_accounts/groups_test.go index 661ab452bf9..bf1f524f413 100644 --- a/e2e/tests/interchain_accounts/groups_test.go +++ b/e2e/tests/interchain_accounts/groups_test.go @@ -134,8 +134,6 @@ func (s *InterchainAccountsGroupsTestSuite) TestInterchainAccountsGroupsIntegrat s.StartRelayer(relayer) }) - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") - t.Run("verify interchain account registration success", func(t *testing.T) { interchainAccAddr, err = s.QueryInterchainAccount(ctx, chainA, groupPolicyAddr, ibctesting.FirstConnectionID) s.Require().NotEmpty(interchainAccAddr) diff --git a/e2e/tests/interchain_accounts/incentivized_test.go b/e2e/tests/interchain_accounts/incentivized_test.go index 5cdfa4667d6..21af9b137dc 100644 --- a/e2e/tests/interchain_accounts/incentivized_test.go +++ b/e2e/tests/interchain_accounts/incentivized_test.go @@ -76,9 +76,6 @@ func (s *IncentivizedInterchainAccountsTestSuite) TestMsgSendTx_SuccessfulBankSe s.StartRelayer(relayer) }) - // Wait for a couple of blocks to ensure channel handshake is complete - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") - var channelOutput ibc.ChannelOutput t.Run("verify interchain account", func(t *testing.T) { var err error @@ -175,8 +172,6 @@ func (s *IncentivizedInterchainAccountsTestSuite) TestMsgSendTx_SuccessfulBankSe s.StartRelayer(relayer) }) - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") - t.Run("packets are relayed", func(t *testing.T) { packets, err := s.QueryIncentivizedPacketsForChannel(ctx, chainA, channelOutput.PortID, channelOutput.ChannelID) s.Require().NoError(err) @@ -259,9 +254,6 @@ func (s *IncentivizedInterchainAccountsTestSuite) TestMsgSendTx_FailedBankSend_I s.StartRelayer(relayer) }) - // Wait for a couple of blocks to ensure channel handshake is complete - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") - var channelOutput ibc.ChannelOutput t.Run("verify interchain account", func(t *testing.T) { var err error @@ -349,8 +341,6 @@ func (s *IncentivizedInterchainAccountsTestSuite) TestMsgSendTx_FailedBankSend_I s.StartRelayer(relayer) }) - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") - t.Run("packets are relayed", func(t *testing.T) { packets, err := s.QueryIncentivizedPacketsForChannel(ctx, chainA, channelOutput.PortID, channelOutput.ChannelID) s.Require().NoError(err) diff --git a/e2e/tests/transfer/base_test.go b/e2e/tests/transfer/base_test.go index 458eb21209b..97c65ccdf82 100644 --- a/e2e/tests/transfer/base_test.go +++ b/e2e/tests/transfer/base_test.go @@ -84,8 +84,6 @@ func (s *TransferTestSuite) TestMsgTransfer_Succeeds_Nonincentivized() { s.StartRelayer(relayer) }) - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") - chainBIBCToken := testsuite.GetIBCToken(chainADenom, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID) t.Run("packets are relayed", func(t *testing.T) { @@ -170,8 +168,6 @@ func (s *TransferTestSuite) TestMsgTransfer_Fails_InvalidAddress() { s.StartRelayer(relayer) }) - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") - t.Run("packets are relayed", func(t *testing.T) { s.AssertPacketRelayed(ctx, chainA, channelA.PortID, channelA.ChannelID, 1) }) @@ -395,8 +391,6 @@ func (s *TransferTestSuite) TestReceiveEnabledParam() { s.StartRelayer(relayer) }) - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") - t.Run("tokens are unescrowed in failed acknowledgement", func(t *testing.T) { actualBalance, err := s.GetChainBNativeBalance(ctx, chainBWallet) s.Require().NoError(err) @@ -462,8 +456,6 @@ func (s *TransferTestSuite) TestMsgTransfer_WithMemo() { s.StartRelayer(relayer) }) - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") - chainBIBCToken := testsuite.GetIBCToken(chainADenom, channelA.Counterparty.PortID, channelA.Counterparty.ChannelID) t.Run("packets relayed", func(t *testing.T) { diff --git a/e2e/tests/transfer/incentivized_test.go b/e2e/tests/transfer/incentivized_test.go index 94e45c0d92e..108bca5d3e7 100644 --- a/e2e/tests/transfer/incentivized_test.go +++ b/e2e/tests/transfer/incentivized_test.go @@ -125,8 +125,6 @@ func (s *IncentivizedTransferTestSuite) TestMsgPayPacketFee_AsyncSingleSender_Su s.StartRelayer(relayer) }) - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") - t.Run("packets are relayed", func(t *testing.T) { packets, err := s.QueryIncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) s.Require().NoError(err) @@ -240,8 +238,6 @@ func (s *IncentivizedTransferTestSuite) TestMsgPayPacketFee_InvalidReceiverAccou s.StartRelayer(relayer) }) - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") - t.Run("packets are relayed", func(t *testing.T) { packets, err := s.QueryIncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) s.Require().NoError(err) @@ -341,8 +337,6 @@ func (s *IncentivizedTransferTestSuite) TestMultiMsg_MsgPayPacketFeeSingleSender s.StartRelayer(relayer) }) - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") - t.Run("packets are relayed", func(t *testing.T) { packets, err := s.QueryIncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) s.Require().NoError(err) @@ -563,8 +557,6 @@ func (s *IncentivizedTransferTestSuite) TestPayPacketFeeAsync_SingleSender_NoCou s.StartRelayer(relayer) }) - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA), "failed to wait for blocks") - t.Run("with no counterparty address", func(t *testing.T) { t.Run("packets are relayed", func(t *testing.T) { packets, err := s.QueryIncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) @@ -700,8 +692,6 @@ func (s *IncentivizedTransferTestSuite) TestMsgPayPacketFee_AsyncMultipleSenders s.StartRelayer(relayer) }) - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") - t.Run("packets are relayed", func(t *testing.T) { packets, err := s.QueryIncentivizedPacketsForChannel(ctx, chainA, channelA.PortID, channelA.ChannelID) s.Require().NoError(err) diff --git a/e2e/testsuite/testsuite.go b/e2e/testsuite/testsuite.go index 29c21ab6680..f34e4b13398 100644 --- a/e2e/testsuite/testsuite.go +++ b/e2e/testsuite/testsuite.go @@ -11,6 +11,7 @@ import ( "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" "github.com/strangelove-ventures/interchaintest/v7/ibc" "github.com/strangelove-ventures/interchaintest/v7/testreporter" + test "github.com/strangelove-ventures/interchaintest/v7/testutil" "github.com/stretchr/testify/suite" "go.uber.org/zap" "go.uber.org/zap/zaptest" @@ -129,6 +130,7 @@ func (s *E2ETestSuite) SetupChainsRelayerAndChannel(ctx context.Context, channel }) // wait for relayer to start. time.Sleep(time.Second * 10) + s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") } s.InitGRPCClients(chainA) From 07b76fb899597ab474f9306f5bef6a6cf65ef56c Mon Sep 17 00:00:00 2001 From: DimitrisJim Date: Thu, 1 Jun 2023 20:11:46 +0300 Subject: [PATCH 13/14] experiment: remove the sleep, keep waiting for 10 blocks. --- e2e/testsuite/testsuite.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/e2e/testsuite/testsuite.go b/e2e/testsuite/testsuite.go index f34e4b13398..30fb9e96d18 100644 --- a/e2e/testsuite/testsuite.go +++ b/e2e/testsuite/testsuite.go @@ -4,7 +4,6 @@ import ( "context" "fmt" "strings" - "time" dockerclient "github.com/docker/docker/client" interchaintest "github.com/strangelove-ventures/interchaintest/v7" @@ -129,8 +128,7 @@ func (s *E2ETestSuite) SetupChainsRelayerAndChannel(ctx context.Context, channel } }) // wait for relayer to start. - time.Sleep(time.Second * 10) - s.Require().NoError(test.WaitForBlocks(ctx, 5, chainA, chainB), "failed to wait for blocks") + s.Require().NoError(test.WaitForBlocks(ctx, 10, chainA, chainB), "failed to wait for blocks") } s.InitGRPCClients(chainA) From c45be2af2702c8f2ad8aae8195e5b5c5614da52b Mon Sep 17 00:00:00 2001 From: DimitrisJim Date: Wed, 7 Jun 2023 13:35:05 +0300 Subject: [PATCH 14/14] Revert. Set rly as the default in the workflow file. --- .github/workflows/e2e-test-workflow-call.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-test-workflow-call.yml b/.github/workflows/e2e-test-workflow-call.yml index fb008d859d9..fa6b9347488 100644 --- a/.github/workflows/e2e-test-workflow-call.yml +++ b/.github/workflows/e2e-test-workflow-call.yml @@ -50,12 +50,12 @@ on: relayer-type: description: "The type of relayer to use" required: false - default: "hermes" + default: "rly" type: string relayer-tag: description: "The tag to use for the relayer" required: false - default: "1.4.0" # the tests themselves will choose a sensible default when unset. + default: "" # the tests themselves will choose a sensible default when unset. type: string build-and-push-docker-image: description: "Flag to specify if the docker image should be built and pushed beforehand"