Skip to content

Commit

Permalink
add local-ics-neutron
Browse files Browse the repository at this point in the history
  • Loading branch information
sainoe committed Jan 29, 2025
1 parent 09987e9 commit 19b1350
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,22 @@ test-interchain-neutron:
CONUSUMER_DISABLE_FEEMARKET="true" \
go test -run TestProviderConsumersSuite -count=1 -v -timeout 30m

# run interchain ICS setup with a Neutron consumer chain. Currently, it's required to have a local docker 'neutron:v5.0.6' image and
# to use the a ICS v6.4.0 due to a versioning constraints.
local-ics-neutron:
cd tests/interchain && \
KEEP_CONTAINERS=true \
SKIP_PROVIDER_CONSUMER_TESTS=true \
PROVIDER_IMAGE_TAG="v6.4.0" \
CONSUMER_CHAIN_ID="neutron" \
CONSUMER_IMAGE_NAME="neutron" \
CONSUMER_IMAGE_TAG="v5.0.6" \
CONSUMER_BINARY="neutrond" \
CONSUMER_BECH32_PREFIX="neutron" \
CONSUMER_DENOM="untrn" \
CONUSUMER_DISABLE_FEEMARKET="true" \
go test -run TestProviderConsumersSuite -count=1 -v -timeout 30m

# run mbt tests
test-mbt:
cd tests/mbt/driver;\
Expand Down
6 changes: 6 additions & 0 deletions tests/interchain/provider_consumers_suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package interchain
import (
"context"
"cosmos/interchain-security/tests/interchain/chainsuite"
"os"
"strconv"
"time"

Expand All @@ -20,9 +21,14 @@ type ProviderConsumersSuite struct {
Consumer *chainsuite.Chain
Relayer *chainsuite.Relayer
ctx context.Context
SkipTests bool
}

func (s *ProviderConsumersSuite) SetupSuite() {
if os.Getenv("SKIP_PROVIDER_CONSUMER_TESTS") == "true" {
s.SkipTests = true
}

ctx, err := chainsuite.NewSuiteContext(&s.Suite)
s.Require().NoError(err)
s.ctx = ctx
Expand Down
6 changes: 5 additions & 1 deletion tests/interchain/provider_consumers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ import (

func TestProviderConsumersSuite(t *testing.T) {
s := &ProviderConsumersSuite{}

suite.Run(t, s)
}

func (s *ProviderConsumersSuite) TestSovereignToConsumerChangeover() {
// Test skipped since not relevant for neutron
s.Suite.T().Skip()

// submit MsgCreateConsumer and verify that the chain is in launched phase
Expand Down Expand Up @@ -128,6 +128,10 @@ func (s *ProviderConsumersSuite) TestSovereignToConsumerChangeover() {
}

func (s *ProviderConsumersSuite) TestRewards() {
if s.SkipTests {
s.T().Skip()
}

transferCh, err := s.Relayer.GetTransferChannel(s.GetContext(), s.Provider, s.Consumer)
s.Require().NoError(err)
s.Require().True(transferCh != nil)
Expand Down

0 comments on commit 19b1350

Please sign in to comment.