Skip to content

Commit

Permalink
chore: bump ibctest version and ibc-go version to v6 for e2e module (#…
Browse files Browse the repository at this point in the history
…2479)

## Description


closes: #XXXX

---

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

- [ ] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md`
- [ ] Re-reviewed `Files changed` in the Github PR explorer
- [ ] Review `Codecov Report` in the comment section below once CI passes
  • Loading branch information
colin-axner authored Oct 6, 2022
1 parent 88525d2 commit 4bd05c6
Show file tree
Hide file tree
Showing 13 changed files with 104 additions and 773 deletions.
14 changes: 7 additions & 7 deletions e2e/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ go 1.18
replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1

require (
github.com/cosmos/cosmos-sdk v0.46.0
github.com/cosmos/ibc-go/v5 v5.0.0-beta1
github.com/cosmos/cosmos-sdk v0.46.1
github.com/cosmos/ibc-go/v6 v6.0.0-alpha1
github.com/cosmos/interchain-accounts v0.3.1-0.20220816085955-393d8444c111
github.com/docker/docker v20.10.17+incompatible
github.com/strangelove-ventures/ibctest v0.0.0-20220824180329-f73a9f936fce
github.com/strangelove-ventures/ibctest/v6 v6.0.0-20221005154709-b642157674bc
github.com/stretchr/testify v1.8.0
github.com/tendermint/tendermint v0.34.20
github.com/tendermint/tendermint v0.34.21
go.uber.org/zap v1.21.0
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4
google.golang.org/grpc v1.48.0
google.golang.org/grpc v1.49.0
)

require (
Expand All @@ -23,7 +23,7 @@ require (
cloud.google.com/go/iam v0.3.0 // indirect
cloud.google.com/go/storage v1.14.0 // indirect
cosmossdk.io/errors v1.0.0-beta.7 // indirect
cosmossdk.io/math v1.0.0-beta.2 // indirect
cosmossdk.io/math v1.0.0-beta.3 // indirect
filippo.io/edwards25519 v1.0.0-rc.1 // indirect
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
github.com/99designs/keyring v1.2.1 // indirect
Expand Down Expand Up @@ -170,6 +170,7 @@ require (
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.8.0 // indirect
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
golang.org/x/net v0.0.0-20220726230323-06994584191e // indirect
golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
Expand All @@ -186,7 +187,6 @@ require (
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
gotest.tools/v3 v3.3.0 // indirect
lukechampine.com/blake3 v1.1.6 // indirect
lukechampine.com/uint128 v1.1.1 // indirect
modernc.org/cc/v3 v3.36.0 // indirect
Expand Down
718 changes: 21 additions & 697 deletions e2e/go.sum

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions e2e/testconfig/testconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
"github.com/strangelove-ventures/ibctest/ibc"
"github.com/strangelove-ventures/ibctest/v6/ibc"
tmjson "github.com/tendermint/tendermint/libs/json"
tmtypes "github.com/tendermint/tendermint/types"

Expand Down Expand Up @@ -159,14 +159,14 @@ func newDefaultSimappConfig(cc ChainConfig, name, chainID, denom string) ibc.Cha
GasAdjustment: 1.3,
TrustingPeriod: "508h",
NoHostMount: false,
ModifyGenesis: defaultModifyGenesis(denom),
ModifyGenesis: defaultModifyGenesis(),
}
}

// defaultModifyGenesis will only modify governance params to ensure the voting period and minimum deposit
// are functional for e2e testing purposes.
func defaultModifyGenesis(denom string) func([]byte) ([]byte, error) {
return func(genbz []byte) ([]byte, error) {
func defaultModifyGenesis() func(ibc.ChainConfig, []byte) ([]byte, error) {
return func(chainConfig ibc.ChainConfig, genbz []byte) ([]byte, error) {
genDoc, err := tmtypes.GenesisDocFromJSON(genbz)
if err != nil {
return nil, fmt.Errorf("failed to unmarshal genesis bytes into genesis doc: %w", err)
Expand All @@ -187,7 +187,7 @@ func defaultModifyGenesis(denom string) func([]byte) ([]byte, error) {
}

// set correct minimum deposit using configured denom
govGenesisState.DepositParams.MinDeposit = sdk.NewCoins(sdk.NewCoin(denom, govv1beta1.DefaultMinDepositTokens))
govGenesisState.DepositParams.MinDeposit = sdk.NewCoins(sdk.NewCoin(chainConfig.Denom, govv1beta1.DefaultMinDepositTokens))
govGenesisState.VotingParams.VotingPeriod = testvalues.VotingPeriod

govGenBz, err := cdc.MarshalJSON(govGenesisState)
Expand Down
10 changes: 5 additions & 5 deletions e2e/tests/core/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ import (
"testing"
"time"

"github.com/strangelove-ventures/ibctest/ibc"
"github.com/strangelove-ventures/ibctest/test"
"github.com/strangelove-ventures/ibctest/v6/ibc"
"github.com/strangelove-ventures/ibctest/v6/test"
"github.com/stretchr/testify/suite"

"github.com/cosmos/ibc-go/e2e/testsuite"
"github.com/cosmos/ibc-go/e2e/testvalues"
clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types"
ibcexported "github.com/cosmos/ibc-go/v5/modules/core/exported"
ibctesting "github.com/cosmos/ibc-go/v5/testing"
clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types"
ibcexported "github.com/cosmos/ibc-go/v6/modules/core/exported"
ibctesting "github.com/cosmos/ibc-go/v6/testing"
)

func TestClientTestSuite(t *testing.T) {
Expand Down
14 changes: 7 additions & 7 deletions e2e/tests/interchain_accounts/base_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"context"
"testing"

ibctest "github.com/strangelove-ventures/ibctest"
"github.com/strangelove-ventures/ibctest/chain/cosmos"
"github.com/strangelove-ventures/ibctest/ibc"
"github.com/strangelove-ventures/ibctest/test"
ibctest "github.com/strangelove-ventures/ibctest/v6"
"github.com/strangelove-ventures/ibctest/v6/chain/cosmos"
"github.com/strangelove-ventures/ibctest/v6/ibc"
"github.com/strangelove-ventures/ibctest/v6/test"
"github.com/stretchr/testify/suite"
"golang.org/x/mod/semver"

Expand All @@ -19,9 +19,9 @@ import (
"github.com/cosmos/ibc-go/e2e/testsuite"
"github.com/cosmos/ibc-go/e2e/testvalues"

icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types"
feetypes "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types"
ibctesting "github.com/cosmos/ibc-go/v5/testing"
icatypes "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/types"
feetypes "github.com/cosmos/ibc-go/v6/modules/apps/29-fee/types"
ibctesting "github.com/cosmos/ibc-go/v6/testing"
)

func TestInterchainAccountsTestSuite(t *testing.T) {
Expand Down
10 changes: 5 additions & 5 deletions e2e/tests/interchain_accounts/incentivized_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ 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"
ibctest "github.com/strangelove-ventures/ibctest"
"github.com/strangelove-ventures/ibctest/ibc"
"github.com/strangelove-ventures/ibctest/test"
ibctest "github.com/strangelove-ventures/ibctest/v6"
"github.com/strangelove-ventures/ibctest/v6/ibc"
"github.com/strangelove-ventures/ibctest/v6/test"
"github.com/stretchr/testify/suite"

"github.com/cosmos/ibc-go/e2e/testvalues"
feetypes "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types"
ibctesting "github.com/cosmos/ibc-go/v5/testing"
feetypes "github.com/cosmos/ibc-go/v6/modules/apps/29-fee/types"
ibctesting "github.com/cosmos/ibc-go/v6/testing"
)

func TestIncentivizedInterchainAccountsTestSuite(t *testing.T) {
Expand Down
8 changes: 4 additions & 4 deletions e2e/tests/transfer/base_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import (
"time"

paramsproposaltypes "github.com/cosmos/cosmos-sdk/x/params/types/proposal"
"github.com/strangelove-ventures/ibctest/ibc"
"github.com/strangelove-ventures/ibctest/test"
"github.com/strangelove-ventures/ibctest/v6/ibc"
"github.com/strangelove-ventures/ibctest/v6/test"
"github.com/stretchr/testify/suite"

"github.com/cosmos/ibc-go/e2e/testsuite"
"github.com/cosmos/ibc-go/e2e/testvalues"
transfertypes "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types"
ibctesting "github.com/cosmos/ibc-go/v5/testing"
transfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types"
ibctesting "github.com/cosmos/ibc-go/v6/testing"
)

func TestTransferTestSuite(t *testing.T) {
Expand Down
10 changes: 5 additions & 5 deletions e2e/tests/transfer/incentivized_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import (
"time"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/strangelove-ventures/ibctest/ibc"
"github.com/strangelove-ventures/ibctest/test"
"github.com/strangelove-ventures/ibctest/v6/ibc"
"github.com/strangelove-ventures/ibctest/v6/test"
"github.com/stretchr/testify/suite"

"github.com/cosmos/ibc-go/e2e/testvalues"
feetypes "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types"
transfertypes "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types"
channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types"
feetypes "github.com/cosmos/ibc-go/v6/modules/apps/29-fee/types"
transfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types"
channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types"
)

type IncentivizedTransferTestSuite struct {
Expand Down
6 changes: 3 additions & 3 deletions e2e/tests/upgrades/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"time"

upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
"github.com/strangelove-ventures/ibctest/chain/cosmos"
"github.com/strangelove-ventures/ibctest/ibc"
"github.com/strangelove-ventures/ibctest/test"
"github.com/strangelove-ventures/ibctest/v6/chain/cosmos"
"github.com/strangelove-ventures/ibctest/v6/ibc"
"github.com/strangelove-ventures/ibctest/v6/test"
"github.com/stretchr/testify/suite"

"github.com/cosmos/ibc-go/e2e/testconfig"
Expand Down
12 changes: 6 additions & 6 deletions e2e/testsuite/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import (

govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
intertxtypes "github.com/cosmos/interchain-accounts/x/inter-tx/types"
"github.com/strangelove-ventures/ibctest/chain/cosmos"
"github.com/strangelove-ventures/ibctest/ibc"
"github.com/strangelove-ventures/ibctest/v6/chain/cosmos"
"github.com/strangelove-ventures/ibctest/v6/ibc"

feetypes "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types"
clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types"
channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types"
ibcexported "github.com/cosmos/ibc-go/v5/modules/core/exported"
feetypes "github.com/cosmos/ibc-go/v6/modules/apps/29-fee/types"
clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types"
channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types"
ibcexported "github.com/cosmos/ibc-go/v6/modules/core/exported"
)

// QueryClientState queries the client state on the given chain for the provided clientID.
Expand Down
15 changes: 11 additions & 4 deletions e2e/testsuite/relayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,28 @@ import (
"testing"

dockerclient "github.com/docker/docker/client"
"github.com/strangelove-ventures/ibctest"
"github.com/strangelove-ventures/ibctest/ibc"
"github.com/strangelove-ventures/ibctest/relayer"
"github.com/strangelove-ventures/ibctest/v6"
"github.com/strangelove-ventures/ibctest/v6/ibc"
"github.com/strangelove-ventures/ibctest/v6/relayer"
"go.uber.org/zap"

"github.com/cosmos/ibc-go/e2e/testconfig"
)

const (
cosmosRelayerRepository = "ghcr.io/cosmos/relayer"
cosmosRelayerUser = "100:1000" // docker run -it --rm --entrypoint echo ghcr.io/cosmos/relayer "$(id -u):$(id -g)"
)

// 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, tc testconfig.TestConfig, logger *zap.Logger, dockerClient *dockerclient.Client, network string) ibc.Relayer {
return ibctest.NewBuiltinRelayerFactory(ibc.CosmosRly, logger, relayer.CustomDockerImage(cosmosRelayerRepository, tc.RlyTag), relayer.StartupFlags("-p", "events")).Build(
customImageOption := relayer.CustomDockerImage(cosmosRelayerRepository, tc.RlyTag, cosmosRelayerUser)
relayerProcessingOption := relayer.StartupFlags("-p", "events") // relayer processes via events

relayerFactory := ibctest.NewBuiltinRelayerFactory(ibc.CosmosRly, logger, customImageOption, relayerProcessingOption)

return relayerFactory.Build(
t, dockerClient, network,
)
}
46 changes: 23 additions & 23 deletions e2e/testsuite/testsuite.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,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"
"github.com/strangelove-ventures/ibctest/chain/cosmos"
"github.com/strangelove-ventures/ibctest/ibc"
"github.com/strangelove-ventures/ibctest/test"
"github.com/strangelove-ventures/ibctest/testreporter"
"github.com/strangelove-ventures/ibctest/v6"
"github.com/strangelove-ventures/ibctest/v6/chain/cosmos"
"github.com/strangelove-ventures/ibctest/v6/ibc"
"github.com/strangelove-ventures/ibctest/v6/test"
"github.com/strangelove-ventures/ibctest/v6/testreporter"
"github.com/stretchr/testify/suite"
"go.uber.org/zap"
"go.uber.org/zap/zaptest"
Expand All @@ -24,10 +24,10 @@ import (

"github.com/cosmos/ibc-go/e2e/testconfig"
"github.com/cosmos/ibc-go/e2e/testvalues"
feetypes "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types"
transfertypes "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types"
clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types"
channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types"
feetypes "github.com/cosmos/ibc-go/v6/modules/apps/29-fee/types"
transfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types"
clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types"
channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types"
)

const (
Expand Down Expand Up @@ -117,28 +117,28 @@ func (s *E2ETestSuite) SetupChainsRelayerAndChannel(ctx context.Context, channel

pathName := s.generatePathName()

channelOptions := ibc.DefaultChannelOpts()
for _, opt := range channelOpts {
opt(&channelOptions)
}

ic := ibctest.NewInterchain().
AddChain(chainA).
AddChain(chainB).
AddRelayer(r, "r").
AddLink(ibctest.InterchainLink{
Chain1: chainA,
Chain2: chainB,
Relayer: r,
Path: pathName,
Chain1: chainA,
Chain2: chainB,
Relayer: r,
Path: pathName,
CreateChannelOpts: channelOptions,
})

channelOptions := ibc.DefaultChannelOpts()
for _, opt := range channelOpts {
opt(&channelOptions)
}

eRep := s.GetRelayerExecReporter()
s.Require().NoError(ic.Build(ctx, eRep, ibctest.InterchainBuildOptions{
TestName: s.T().Name(),
Client: s.DockerClient,
NetworkID: s.network,
CreateChannelOpts: channelOptions,
TestName: s.T().Name(),
Client: s.DockerClient,
NetworkID: s.network,
}))

s.startRelayerFn = func(relayer ibc.Relayer) {
Expand Down Expand Up @@ -453,7 +453,7 @@ func (s *E2ETestSuite) ExecuteGovProposal(ctx context.Context, chain *cosmos.Cos
s.Require().NoError(err)
s.Require().Equal(govtypes.StatusVotingPeriod, proposal.Status)

err = chain.VoteOnProposalAllValidators(ctx, "1", ibc.ProposalVoteYes)
err = chain.VoteOnProposalAllValidators(ctx, "1", cosmos.ProposalVoteYes)
s.Require().NoError(err)

// ensure voting period has not passed before validators finished voting
Expand Down
4 changes: 2 additions & 2 deletions e2e/testvalues/values.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"time"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/strangelove-ventures/ibctest/ibc"
"github.com/strangelove-ventures/ibctest/v6/ibc"

feetypes "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types"
feetypes "github.com/cosmos/ibc-go/v6/modules/apps/29-fee/types"
)

const (
Expand Down

0 comments on commit 4bd05c6

Please sign in to comment.