diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 64a459b9415..9fe4b02cefd 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -35,10 +35,29 @@ jobs: echo "Using tag $tag" echo "simd-tag=$tag" >> $GITHUB_OUTPUT fi + + build-e2e: + if: ${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v3 + with: + go-version: 1.19 + - name: Build e2e + run: | + cd e2e + test_dirs="$(ls -A tests)" + for td in $test_dirs + do + go test -c "./tests/${td}" + done + e2e: if: ${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} needs: - determine-image-tag + - build-e2e # don't attempt any tests unless the e2e code compiles successfully. uses: ./.github/workflows/e2e-test-workflow-call.yml secrets: inherit with: diff --git a/e2e/README.md b/e2e/README.md index 070b1773252..0ca688bd0fb 100644 --- a/e2e/README.md +++ b/e2e/README.md @@ -13,7 +13,7 @@ - [Arbitrary commands](#arbitrary-commands) - [IBC transfer](#ibc-transfer) 2. [Test design](#test-design) - - a. [ibctest](#ibctest) + - a. [interchaintest](#interchaintest) - b. [CI configuration](#ci-configuration) 3. [Github Workflows](#github-workflows) 4. [Running Compatibility Tests](#running-compatibility-tests) @@ -75,10 +75,10 @@ make e2e-test entrypoint=TestInterchainAccountsTestSuite test=TestMsgSubmitTx_Su ``` -> Note: sometimes it can be useful to make changes to [ibctest](https://github.com/strangelove-ventures/ibctest) when running tests locally. In order to do this, add the following line to +> Note: sometimes it can be useful to make changes to [ibctest](https://github.com/strangelove-ventures/interchaintest) when running tests locally. In order to do this, add the following line to e2e/go.mod -`replace github.com/strangelove-ventures/ibctest => ../ibctest` +`replace github.com/strangelove-ventures/interchaintest => ../ibctest` Or point it to any local checkout you have. @@ -207,9 +207,9 @@ t.Run("send IBC transfer", func(t *testing.T){ ## Test design -#### ibctest +#### interchaintest -These E2E tests use the [ibctest framework](https://github.com/strangelove-ventures/ibctest). This framework creates chains and relayers in containers and allows for arbitrary commands to be executed in the chain containers, +These E2E tests use the [interchaintest framework](https://github.com/strangelove-ventures/interchaintest). This framework creates chains and relayers in containers and allows for arbitrary commands to be executed in the chain containers, as well as allowing us to broadcast arbitrary messages which are signed on behalf of a user created in the test. diff --git a/e2e/go.mod b/e2e/go.mod index 2cfda8e3f33..77166203826 100644 --- a/e2e/go.mod +++ b/e2e/go.mod @@ -8,7 +8,7 @@ require ( github.com/cosmos/ibc-go/v7 v7.0.0-20230120105519-ae96bf3d5ee9 github.com/cosmos/interchain-accounts v0.4.1-0.20230116203650-08d2a4529a5d github.com/docker/docker v20.10.19+incompatible - github.com/strangelove-ventures/ibctest/v7 v7.0.0-20230124162348-0fcd87d2151a + github.com/strangelove-ventures/interchaintest/v7 v7.0.0-20230201060741-e0e4e0f9283b github.com/stretchr/testify v1.8.1 go.uber.org/zap v1.23.0 golang.org/x/mod v0.6.0 diff --git a/e2e/go.sum b/e2e/go.sum index 0147e4233ab..c0999c86e9e 100644 --- a/e2e/go.sum +++ b/e2e/go.sum @@ -822,8 +822,8 @@ github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= github.com/strangelove-ventures/go-subkey v1.0.7 h1:cOP/Lajg3uxV/tvspu0m6+0Cu+DJgygkEAbx/s+f35I= github.com/strangelove-ventures/go-subkey v1.0.7/go.mod h1:E34izOIEm+sZ1YmYawYRquqBQWeZBjVB4pF7bMuhc1c= -github.com/strangelove-ventures/ibctest/v7 v7.0.0-20230124162348-0fcd87d2151a h1:I68lhxUi40elS4/4OAA9r71yQM4UpkRNFlfCxD43rUQ= -github.com/strangelove-ventures/ibctest/v7 v7.0.0-20230124162348-0fcd87d2151a/go.mod h1:hU36IqtAQslhbGcRqQCfZk52xkWwNAMujFxypvzS2Gg= +github.com/strangelove-ventures/interchaintest/v7 v7.0.0-20230201060741-e0e4e0f9283b h1:TPt4lyXM0XJUrgaO5ufBsAx9jbrNuwvSZvnIBL/5ui0= +github.com/strangelove-ventures/interchaintest/v7 v7.0.0-20230201060741-e0e4e0f9283b/go.mod h1:xABocejOFzpH8VR9Se92KE02IqR3cLhzGnl4SHV36Qw= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= diff --git a/e2e/testconfig/testconfig.go b/e2e/testconfig/testconfig.go index 17eae5fc492..fcd7e262caf 100644 --- a/e2e/testconfig/testconfig.go +++ b/e2e/testconfig/testconfig.go @@ -13,7 +13,7 @@ import ( govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" gogoproto "github.com/cosmos/gogoproto/proto" - "github.com/strangelove-ventures/ibctest/v7/ibc" + "github.com/strangelove-ventures/interchaintest/v7/ibc" "github.com/cosmos/ibc-go/e2e/semverutil" "github.com/cosmos/ibc-go/e2e/testvalues" diff --git a/e2e/tests/core/03-connection/connection_test.go b/e2e/tests/core/03-connection/connection_test.go index 7c5d452fb06..1694bc2e0ce 100644 --- a/e2e/tests/core/03-connection/connection_test.go +++ b/e2e/tests/core/03-connection/connection_test.go @@ -9,8 +9,8 @@ import ( "time" paramsproposaltypes "github.com/cosmos/cosmos-sdk/x/params/types/proposal" - "github.com/strangelove-ventures/ibctest/v7/ibc" - test "github.com/strangelove-ventures/ibctest/v7/testutil" + "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 a1facd0dd0a..03b1b9566cd 100644 --- a/e2e/tests/core/client_test.go +++ b/e2e/tests/core/client_test.go @@ -7,8 +7,8 @@ import ( "testing" "time" - "github.com/strangelove-ventures/ibctest/v7/ibc" - test "github.com/strangelove-ventures/ibctest/v7/testutil" + "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/base_test.go b/e2e/tests/interchain_accounts/base_test.go index ac0acfdd817..53c5384be31 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/ibctest/v7" - "github.com/strangelove-ventures/ibctest/v7/chain/cosmos" - "github.com/strangelove-ventures/ibctest/v7/ibc" - test "github.com/strangelove-ventures/ibctest/v7/testutil" + "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" @@ -95,7 +95,7 @@ func (s *InterchainAccountsTestSuite) TestMsgSendTx_SuccessfulTransfer() { t.Run("interchain account executes a bank transfer on behalf of the corresponding owner account", func(t *testing.T) { t.Run("fund interchain account wallet", func(t *testing.T) { // fund the host account so it has some $$ to send - err := chainB.SendFunds(ctx, ibctest.FaucetAccountKeyName, ibc.WalletAmount{ + err := chainB.SendFunds(ctx, interchaintest.FaucetAccountKeyName, ibc.WalletAmount{ Address: hostAccount, Amount: testvalues.StartingTokenAmount, Denom: chainB.Config().Denom, @@ -293,7 +293,7 @@ func (s *InterchainAccountsTestSuite) TestMsgSubmitTx_SuccessfulTransfer_AfterRe t.Run("submit tx message with bank transfer message times out", func(t *testing.T) { t.Run("fund interchain account wallet", func(t *testing.T) { // fund the host account account so it has some $$ to send - err := chainB.SendFunds(ctx, ibctest.FaucetAccountKeyName, ibc.WalletAmount{ + err := chainB.SendFunds(ctx, interchaintest.FaucetAccountKeyName, ibc.WalletAmount{ Address: hostAccount, Amount: testvalues.StartingTokenAmount, Denom: chainB.Config().Denom, diff --git a/e2e/tests/interchain_accounts/gov_test.go b/e2e/tests/interchain_accounts/gov_test.go index 08da6cb046e..2f572c35596 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/ibctest/v7" - "github.com/strangelove-ventures/ibctest/v7/ibc" - test "github.com/strangelove-ventures/ibctest/v7/testutil" + "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" @@ -74,7 +74,7 @@ func (s *InterchainAccountsGovTestSuite) TestInterchainAccountsGovIntegration() t.Run("interchain account executes a bank transfer on behalf of the corresponding owner account", func(t *testing.T) { t.Run("fund interchain account wallet", func(t *testing.T) { // fund the host account, so it has some $$ to send - err := chainB.SendFunds(ctx, ibctest.FaucetAccountKeyName, ibc.WalletAmount{ + err := chainB.SendFunds(ctx, interchaintest.FaucetAccountKeyName, ibc.WalletAmount{ Address: interchainAccAddr, Amount: testvalues.StartingTokenAmount, Denom: chainB.Config().Denom, diff --git a/e2e/tests/interchain_accounts/groups_test.go b/e2e/tests/interchain_accounts/groups_test.go index 80ac49e3513..7e7ad72324d 100644 --- a/e2e/tests/interchain_accounts/groups_test.go +++ b/e2e/tests/interchain_accounts/groups_test.go @@ -9,9 +9,9 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" grouptypes "github.com/cosmos/cosmos-sdk/x/group" "github.com/cosmos/gogoproto/proto" - ibctest "github.com/strangelove-ventures/ibctest/v7" - "github.com/strangelove-ventures/ibctest/v7/ibc" - test "github.com/strangelove-ventures/ibctest/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" @@ -148,7 +148,7 @@ func (s *InterchainAccountsGroupsTestSuite) TestInterchainAccountsGroupsIntegrat }) t.Run("fund interchain account wallet", func(t *testing.T) { - err := chainB.SendFunds(ctx, ibctest.FaucetAccountKeyName, ibc.WalletAmount{ + err := chainB.SendFunds(ctx, interchaintest.FaucetAccountKeyName, ibc.WalletAmount{ Address: interchainAccAddr, Amount: testvalues.StartingTokenAmount, Denom: chainB.Config().Denom, diff --git a/e2e/tests/interchain_accounts/incentivized_test.go b/e2e/tests/interchain_accounts/incentivized_test.go index 8675be1cbf1..e91f52eb439 100644 --- a/e2e/tests/interchain_accounts/incentivized_test.go +++ b/e2e/tests/interchain_accounts/incentivized_test.go @@ -8,10 +8,10 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/gogoproto/proto" - ibctest "github.com/strangelove-ventures/ibctest/v7" - "github.com/strangelove-ventures/ibctest/v7/chain/cosmos" - "github.com/strangelove-ventures/ibctest/v7/ibc" - test "github.com/strangelove-ventures/ibctest/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" "github.com/cosmos/ibc-go/e2e/testconfig" @@ -107,7 +107,7 @@ func (s *IncentivizedInterchainAccountsTestSuite) TestMsgSendTx_SuccessfulBankSe t.Run("execute interchain account bank send through controller", func(t *testing.T) { t.Run("fund interchain account wallet on host chainB", func(t *testing.T) { // fund the interchain account so it has some $$ to send - err := chainB.SendFunds(ctx, ibctest.FaucetAccountKeyName, ibc.WalletAmount{ + err := chainB.SendFunds(ctx, interchaintest.FaucetAccountKeyName, ibc.WalletAmount{ Address: interchainAcc, Amount: testvalues.StartingTokenAmount, Denom: chainB.Config().Denom, diff --git a/e2e/tests/interchain_accounts/intertx_incentivized_test.go b/e2e/tests/interchain_accounts/intertx_incentivized_test.go index 9464844fdca..a76ae1a990c 100644 --- a/e2e/tests/interchain_accounts/intertx_incentivized_test.go +++ b/e2e/tests/interchain_accounts/intertx_incentivized_test.go @@ -7,9 +7,9 @@ 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" - "github.com/strangelove-ventures/ibctest/v7" - "github.com/strangelove-ventures/ibctest/v7/ibc" - test "github.com/strangelove-ventures/ibctest/v7/testutil" + "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" @@ -89,7 +89,7 @@ func (s *IncentivizedInterTxTestSuite) TestMsgSubmitTx_SuccessfulBankSend_Incent t.Run("execute interchain account bank send through controller", func(t *testing.T) { t.Run("fund interchain account wallet on host chainB", func(t *testing.T) { // fund the interchain account so it has some $$ to send - err := chainB.SendFunds(ctx, ibctest.FaucetAccountKeyName, ibc.WalletAmount{ + err := chainB.SendFunds(ctx, interchaintest.FaucetAccountKeyName, ibc.WalletAmount{ Address: interchainAcc, Amount: testvalues.StartingTokenAmount, Denom: chainB.Config().Denom, diff --git a/e2e/tests/interchain_accounts/intertx_test.go b/e2e/tests/interchain_accounts/intertx_test.go index 9d2942cc810..b70d539a55b 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/ibctest/v7" - "github.com/strangelove-ventures/ibctest/v7/chain/cosmos" - "github.com/strangelove-ventures/ibctest/v7/ibc" - test "github.com/strangelove-ventures/ibctest/v7/testutil" + "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" @@ -77,7 +77,7 @@ func (s *InterTxTestSuite) TestMsgSubmitTx_SuccessfulTransfer() { t.Run("interchain account executes a bank transfer on behalf of the corresponding owner account", func(t *testing.T) { t.Run("fund interchain account wallet", func(t *testing.T) { // fund the host account account so it has some $$ to send - err := chainB.SendFunds(ctx, ibctest.FaucetAccountKeyName, ibc.WalletAmount{ + err := chainB.SendFunds(ctx, interchaintest.FaucetAccountKeyName, ibc.WalletAmount{ Address: hostAccount, Amount: testvalues.StartingTokenAmount, Denom: chainB.Config().Denom, diff --git a/e2e/tests/transfer/base_test.go b/e2e/tests/transfer/base_test.go index 7c1a8be7051..d858bc04058 100644 --- a/e2e/tests/transfer/base_test.go +++ b/e2e/tests/transfer/base_test.go @@ -7,8 +7,8 @@ import ( "time" paramsproposaltypes "github.com/cosmos/cosmos-sdk/x/params/types/proposal" - "github.com/strangelove-ventures/ibctest/v7/ibc" - test "github.com/strangelove-ventures/ibctest/v7/testutil" + "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 85f15c2e18d..7da6e7b5c5d 100644 --- a/e2e/tests/transfer/incentivized_test.go +++ b/e2e/tests/transfer/incentivized_test.go @@ -6,8 +6,8 @@ import ( "time" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/strangelove-ventures/ibctest/v7/ibc" - test "github.com/strangelove-ventures/ibctest/v7/testutil" + "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/upgrades/upgrade_test.go b/e2e/tests/upgrades/upgrade_test.go index 337a5e266af..4a84e69a308 100644 --- a/e2e/tests/upgrades/upgrade_test.go +++ b/e2e/tests/upgrades/upgrade_test.go @@ -12,10 +12,10 @@ import ( "github.com/cosmos/gogoproto/proto" v6upgrades "github.com/cosmos/interchain-accounts/app/upgrades/v6" intertxtypes "github.com/cosmos/interchain-accounts/x/inter-tx/types" - ibctest "github.com/strangelove-ventures/ibctest/v7" - "github.com/strangelove-ventures/ibctest/v7/chain/cosmos" - "github.com/strangelove-ventures/ibctest/v7/ibc" - test "github.com/strangelove-ventures/ibctest/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" @@ -242,7 +242,7 @@ func (s *UpgradeTestSuite) TestV5ToV6ChainUpgrade() { t.Run("interchain account executes a bank transfer on behalf of the corresponding owner account", func(t *testing.T) { t.Run("fund interchain account wallet", func(t *testing.T) { // fund the host account account so it has some $$ to send - err := chainB.SendFunds(ctx, ibctest.FaucetAccountKeyName, ibc.WalletAmount{ + err := chainB.SendFunds(ctx, interchaintest.FaucetAccountKeyName, ibc.WalletAmount{ Address: hostAccount, Amount: testvalues.StartingTokenAmount, Denom: chainB.Config().Denom, diff --git a/e2e/testsuite/grpc_query.go b/e2e/testsuite/grpc_query.go index 5babe87970f..ff38ae0f09e 100644 --- a/e2e/testsuite/grpc_query.go +++ b/e2e/testsuite/grpc_query.go @@ -6,8 +6,8 @@ import ( govtypesv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" govtypesbeta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" intertxtypes "github.com/cosmos/interchain-accounts/x/inter-tx/types" - "github.com/strangelove-ventures/ibctest/v7/chain/cosmos" - "github.com/strangelove-ventures/ibctest/v7/ibc" + "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" + "github.com/strangelove-ventures/interchaintest/v7/ibc" controllertypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/types" feetypes "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/types" diff --git a/e2e/testsuite/relayer.go b/e2e/testsuite/relayer.go index 3728eac56bb..dcf20a15548 100644 --- a/e2e/testsuite/relayer.go +++ b/e2e/testsuite/relayer.go @@ -4,9 +4,9 @@ import ( "testing" dockerclient "github.com/docker/docker/client" - "github.com/strangelove-ventures/ibctest/v7" - "github.com/strangelove-ventures/ibctest/v7/ibc" - "github.com/strangelove-ventures/ibctest/v7/relayer" + 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" "github.com/cosmos/ibc-go/e2e/testconfig" @@ -23,7 +23,7 @@ func newCosmosRelayer(t *testing.T, tc testconfig.TestConfig, logger *zap.Logger customImageOption := relayer.CustomDockerImage(cosmosRelayerRepository, tc.RlyTag, cosmosRelayerUser) relayerProcessingOption := relayer.StartupFlags("-p", "events") // relayer processes via events - relayerFactory := ibctest.NewBuiltinRelayerFactory(ibc.CosmosRly, logger, customImageOption, relayerProcessingOption) + relayerFactory := interchaintest.NewBuiltinRelayerFactory(ibc.CosmosRly, logger, customImageOption, relayerProcessingOption) return relayerFactory.Build( t, dockerClient, network, diff --git a/e2e/testsuite/testsuite.go b/e2e/testsuite/testsuite.go index 299ebdbb5aa..05fb56232ba 100644 --- a/e2e/testsuite/testsuite.go +++ b/e2e/testsuite/testsuite.go @@ -21,11 +21,11 @@ import ( paramsproposaltypes "github.com/cosmos/cosmos-sdk/x/params/types/proposal" intertxtypes "github.com/cosmos/interchain-accounts/x/inter-tx/types" dockerclient "github.com/docker/docker/client" - "github.com/strangelove-ventures/ibctest/v7" - "github.com/strangelove-ventures/ibctest/v7/chain/cosmos" - "github.com/strangelove-ventures/ibctest/v7/ibc" - "github.com/strangelove-ventures/ibctest/v7/testreporter" - test "github.com/strangelove-ventures/ibctest/v7/testutil" + interchaintest "github.com/strangelove-ventures/interchaintest/v7" + "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" @@ -133,11 +133,11 @@ func (s *E2ETestSuite) SetupChainsRelayerAndChannel(ctx context.Context, channel opt(&channelOptions) } - ic := ibctest.NewInterchain(). + ic := interchaintest.NewInterchain(). AddChain(chainA). AddChain(chainB). AddRelayer(r, "r"). - AddLink(ibctest.InterchainLink{ + AddLink(interchaintest.InterchainLink{ Chain1: chainA, Chain2: chainB, Relayer: r, @@ -146,7 +146,7 @@ func (s *E2ETestSuite) SetupChainsRelayerAndChannel(ctx context.Context, channel }) eRep := s.GetRelayerExecReporter() - s.Require().NoError(ic.Build(ctx, eRep, ibctest.InterchainBuildOptions{ + s.Require().NoError(ic.Build(ctx, eRep, interchaintest.InterchainBuildOptions{ TestName: s.T().Name(), Client: s.DockerClient, NetworkID: s.network, @@ -231,23 +231,9 @@ func (s *E2ETestSuite) GetChains(chainOpts ...testconfig.ChainOptionConfiguratio return path.chainA, path.chainB } -// TODO: remove this type once the broadcast user interface aligns with ibc.Wallet -type broadcastUser struct { - ibc.Wallet -} - -// FormattedAddressWithPrefix implement the broadcast user interface, the FormattedAddress -// function already includes the correct prefix. -func (b *broadcastUser) FormattedAddressWithPrefix(prefix string) string { - return b.FormattedAddress() -} - // BroadcastMessages broadcasts the provided messages to the given chain and signs them on behalf of the provided user. // Once the broadcast response is returned, we wait for a few blocks to be created on both chain A and chain B. func (s *E2ETestSuite) BroadcastMessages(ctx context.Context, chain *cosmos.CosmosChain, user ibc.Wallet, msgs ...sdk.Msg) (sdk.TxResponse, error) { - // wrap the user so it is a valid implementation of broadcast user. - b := broadcastUser{Wallet: user} - broadcaster := cosmos.NewBroadcaster(s.T(), chain) broadcaster.ConfigureClientContextOptions(func(clientContext client.Context) client.Context { @@ -261,7 +247,7 @@ func (s *E2ETestSuite) BroadcastMessages(ctx context.Context, chain *cosmos.Cosm return factory.WithGas(DefaultGasValue) }) - resp, err := cosmos.BroadcastTx(ctx, broadcaster, &b, msgs...) + resp, err := cosmos.BroadcastTx(ctx, broadcaster, user, msgs...) if err != nil { return sdk.TxResponse{}, err } @@ -351,13 +337,13 @@ func (s *E2ETestSuite) StopRelayer(ctx context.Context, relayer ibc.Relayer) { // CreateUserOnChainA creates a user with the given amount of funds on chain A. func (s *E2ETestSuite) CreateUserOnChainA(ctx context.Context, amount int64) ibc.Wallet { chainA, _ := s.GetChains() - return ibctest.GetAndFundTestUsers(s.T(), ctx, strings.ReplaceAll(s.T().Name(), " ", "-"), amount, chainA)[0] + return interchaintest.GetAndFundTestUsers(s.T(), ctx, strings.ReplaceAll(s.T().Name(), " ", "-"), amount, chainA)[0] } // CreateUserOnChainB creates a user with the given amount of funds on chain B. func (s *E2ETestSuite) CreateUserOnChainB(ctx context.Context, amount int64) ibc.Wallet { _, chainB := s.GetChains() - return ibctest.GetAndFundTestUsers(s.T(), ctx, strings.ReplaceAll(s.T().Name(), " ", "-"), amount, chainB)[0] + return interchaintest.GetAndFundTestUsers(s.T(), ctx, strings.ReplaceAll(s.T().Name(), " ", "-"), amount, chainB)[0] } // GetChainANativeBalance gets the balance of a given user on chain A. @@ -436,7 +422,7 @@ func (s *E2ETestSuite) AssertPacketRelayed(ctx context.Context, chain *cosmos.Co // createCosmosChains creates two separate chains in docker containers. // test and can be retrieved with GetChains. func (s *E2ETestSuite) createCosmosChains(chainOptions testconfig.ChainOptions) (*cosmos.CosmosChain, *cosmos.CosmosChain) { - client, network := ibctest.DockerSetup(s.T()) + client, network := interchaintest.DockerSetup(s.T()) s.logger = zap.NewExample() s.DockerClient = client diff --git a/e2e/testvalues/values.go b/e2e/testvalues/values.go index 87fc3bc82e6..c4c09e68781 100644 --- a/e2e/testvalues/values.go +++ b/e2e/testvalues/values.go @@ -5,7 +5,7 @@ import ( "time" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/strangelove-ventures/ibctest/v7/ibc" + "github.com/strangelove-ventures/interchaintest/v7/ibc" feetypes "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/types" )