Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade ictest and add register-zone test #521

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/interchaintest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:
paths:
- "**.go"
- "go.sum"
pull_request:


env:
REGISTRY: quicksilverzone
Expand Down Expand Up @@ -101,3 +103,19 @@ jobs:
- run: make ictest-interchainstaking
env:
BRANCH_CI: "latest"
test-quicksilver-register-zones:
runs-on: ubuntu-latest
needs: build-and-push-image
steps:
- name: Set up Go 1.20
uses: actions/setup-go@v4
with:
go-version: "1.20.5"
id: go

- name: checkout chain
uses: actions/checkout@v3

- run: make ictest-rz
env:
BRANCH_CI: "latest"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ coverage.txt
# Go
go.work
go.work.sum

7 changes: 3 additions & 4 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ import (
porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types"
ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported"
ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"
packetforward "github.com/strangelove-ventures/packet-forward-middleware/v7/router"
packetforwardkeeper "github.com/strangelove-ventures/packet-forward-middleware/v7/router/keeper"
packetforwardtypes "github.com/strangelove-ventures/packet-forward-middleware/v7/router/types"

appconfig "github.com/ingenuity-build/quicksilver/cmd/config"
"github.com/ingenuity-build/quicksilver/utils"
"github.com/ingenuity-build/quicksilver/wasmbinding"
Expand All @@ -78,6 +74,9 @@ import (
participationrewardstypes "github.com/ingenuity-build/quicksilver/x/participationrewards/types"
tokenfactorykeeper "github.com/ingenuity-build/quicksilver/x/tokenfactory/keeper"
tokenfactorytypes "github.com/ingenuity-build/quicksilver/x/tokenfactory/types"
packetforward "github.com/strangelove-ventures/packet-forward-middleware/v7/router"
packetforwardkeeper "github.com/strangelove-ventures/packet-forward-middleware/v7/router/keeper"
packetforwardtypes "github.com/strangelove-ventures/packet-forward-middleware/v7/router/types"
)

type AppKeepers struct {
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ require (
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
github.com/gofrs/flock v0.8.1 // indirect
github.com/gogo/googleapis v1.4.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/glog v1.1.2 // indirect
github.com/gogo/protobuf v1.3.3 // indirect
github.com/golang/glog v1.1.1 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/mock v1.6.0 // indirect
github.com/golang/snappy v0.0.4 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -784,8 +784,8 @@ github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0
github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4=
github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo=
github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ=
github.com/golang/glog v1.1.1 h1:jxpi2eWoU84wbX9iIEyAeeoac3FLuifZpY9tcNUD9kw=
github.com/golang/glog v1.1.1/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ=
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
Expand Down
6 changes: 3 additions & 3 deletions test/interchaintest/chain_start_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"context"
"testing"

"github.com/strangelove-ventures/interchaintest/v5"
"github.com/strangelove-ventures/interchaintest/v5/chain/cosmos"
"github.com/strangelove-ventures/interchaintest/v5/testreporter"
"github.com/strangelove-ventures/interchaintest/v7"
"github.com/strangelove-ventures/interchaintest/v7/chain/cosmos"
"github.com/strangelove-ventures/interchaintest/v7/testreporter"
"github.com/stretchr/testify/require"
"go.uber.org/zap/zaptest"
)
Expand Down
212 changes: 126 additions & 86 deletions test/interchaintest/go.mod

Large diffs are not rendered by default.

1,008 changes: 913 additions & 95 deletions test/interchaintest/go.sum

Large diffs are not rendered by default.

20 changes: 11 additions & 9 deletions test/interchaintest/ibc_transfer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ import (
"fmt"
"testing"

transfertypes "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types"
"github.com/strangelove-ventures/interchaintest/v5"
"github.com/strangelove-ventures/interchaintest/v5/chain/cosmos"
"github.com/strangelove-ventures/interchaintest/v5/ibc"
"github.com/strangelove-ventures/interchaintest/v5/testreporter"
"github.com/strangelove-ventures/interchaintest/v5/testutil"
"cosmossdk.io/math"
transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types"
"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/relayer"
"github.com/strangelove-ventures/interchaintest/v7/testreporter"
"github.com/strangelove-ventures/interchaintest/v7/testutil"
"github.com/stretchr/testify/require"
"go.uber.org/zap/zaptest"
)
Expand Down Expand Up @@ -58,7 +60,7 @@ func TestQuicksilverJunoIBCTransfer(t *testing.T) {
// Create relayer factory to utilize the go-relayer
client, network := interchaintest.DockerSetup(t)

r := interchaintest.NewBuiltinRelayerFactory(ibc.CosmosRly, zaptest.NewLogger(t)).Build(t, client, network)
r := interchaintest.NewBuiltinRelayerFactory(ibc.CosmosRly, zaptest.NewLogger(t), relayer.CustomDockerImage("ghcr.io/notional-labs/cosmos-relayer", "nguyen-v2.3.1", "1000:1000")).Build(t, client, network)

// Create a new Interchain object which describes the chains, relayers, and IBC connections we want to use
ic := interchaintest.NewInterchain().
Expand Down Expand Up @@ -126,7 +128,7 @@ func TestQuicksilverJunoIBCTransfer(t *testing.T) {
require.Equal(t, genesisWalletAmount, junoOrigBal)

// Compose an IBC transfer and send from Quicksilver -> Juno
const transferAmount = int64(1_000)
transferAmount := math.NewInt(1000)
transfer := ibc.WalletAmount{
Address: junoUserAddr,
Denom: quicksilver.Config().Denom,
Expand All @@ -153,7 +155,7 @@ func TestQuicksilverJunoIBCTransfer(t *testing.T) {
// Assert that the funds are no longer present in user acc on Juno and are in the user acc on Juno
quicksilverUpdateBal, err := quicksilver.GetBalance(ctx, quickUserAddr, quicksilver.Config().Denom)
require.NoError(t, err)
require.Equal(t, quicksilverOrigBal-transferAmount, quicksilverUpdateBal)
require.True(t, quicksilverUpdateBal.Equal(quicksilverOrigBal.Sub(transferAmount)))

junoUpdateBal, err := juno.GetBalance(ctx, junoUserAddr, quicksilverIBCDenom)
require.NoError(t, err)
Expand Down
19 changes: 7 additions & 12 deletions test/interchaintest/interchainstaking_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ import (
"fmt"
"testing"

"github.com/strangelove-ventures/interchaintest/v5"
"github.com/strangelove-ventures/interchaintest/v5/chain/cosmos"
"github.com/strangelove-ventures/interchaintest/v5/ibc"
"github.com/strangelove-ventures/interchaintest/v5/testreporter"
"github.com/strangelove-ventures/interchaintest/v5/testutil"
"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/relayer"
"github.com/strangelove-ventures/interchaintest/v7/testreporter"
"github.com/strangelove-ventures/interchaintest/v7/testutil"
"github.com/stretchr/testify/require"
"go.uber.org/zap/zaptest"
)
Expand Down Expand Up @@ -56,7 +57,7 @@ func TestInterchainStaking(t *testing.T) {
// Create relayer factory to utilize the go-relayer
client, network := interchaintest.DockerSetup(t)

r := interchaintest.NewBuiltinRelayerFactory(ibc.CosmosRly, zaptest.NewLogger(t)).Build(t, client, network)
r := interchaintest.NewBuiltinRelayerFactory(ibc.CosmosRly, zaptest.NewLogger(t), relayer.CustomDockerImage("ghcr.io/notional-labs/cosmos-relayer", "nguyen-v2.3.1", "1000:1000")).Build(t, client, network)

// Create a new Interchain object which describes the chains, relayers, and IBC connections we want to use
ic := interchaintest.NewInterchain().
Expand Down Expand Up @@ -194,9 +195,6 @@ chains:

err = icq.StartContainer(ctx)
require.NoError(t, err)

err = icq.Running(ctx)
require.NoError(t, err)
}

func runXCC(t *testing.T, ctx context.Context, quicksilver, juno *cosmos.CosmosChain) {
Expand Down Expand Up @@ -229,7 +227,4 @@ chains:

err = xcc.StartContainer(ctx)
require.NoError(t, err)

err = xcc.Running(ctx)
require.NoError(t, err)
}
Loading