From 137a3b97267a473b3551502dc8bece3e2f806f1e Mon Sep 17 00:00:00 2001 From: violet <158512193+fastfadingviolets@users.noreply.github.com> Date: Wed, 4 Dec 2024 10:02:05 -0500 Subject: [PATCH] ci: Fixes to get interchaintest to run on v22 (#3433) --- tests/interchain/chainsuite/chain_ics.go | 7 +++++++ tests/interchain/chainsuite/config.go | 2 +- tests/interchain/validator/config_test.go | 9 ++++++--- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/tests/interchain/chainsuite/chain_ics.go b/tests/interchain/chainsuite/chain_ics.go index 0036b27648..fb4c9b3831 100644 --- a/tests/interchain/chainsuite/chain_ics.go +++ b/tests/interchain/chainsuite/chain_ics.go @@ -384,6 +384,13 @@ func (p *Chain) DefaultConsumerChainSpec(ctx context.Context, chainID string, co if err != nil { return nil, err } + if chainType == neutronChain || chainType == strideChain { + // Stride and Neutron aren't updated yet to use the consumer ID + b, err = sjson.DeleteBytes(b, "app_state.ccvconsumer.params.consumer_id") + if err != nil { + return nil, err + } + } if chainType == strideChain { b, err = sjson.SetBytes(b, "app_state.epochs.epochs.#(identifier==\"day\").duration", "120s") if err != nil { diff --git a/tests/interchain/chainsuite/config.go b/tests/interchain/chainsuite/config.go index eed5db7c88..6745329263 100644 --- a/tests/interchain/chainsuite/config.go +++ b/tests/interchain/chainsuite/config.go @@ -49,7 +49,7 @@ const ( ChainSpawnWait = 155 * time.Second SlashingWindowConsumer = 20 BlocksPerDistribution = 10 - StrideVersion = "v22.0.0" + StrideVersion = "v24.0.0" NeutronVersion = "v3.0.2" TransferPortID = "transfer" // This is needed because not every ics image is in the default heighliner registry diff --git a/tests/interchain/validator/config_test.go b/tests/interchain/validator/config_test.go index 25d26fcb91..7f731502e8 100644 --- a/tests/interchain/validator/config_test.go +++ b/tests/interchain/validator/config_test.go @@ -18,6 +18,7 @@ import ( "github.com/strangelove-ventures/interchaintest/v8" "github.com/strangelove-ventures/interchaintest/v8/chain/cosmos" "github.com/strangelove-ventures/interchaintest/v8/testutil" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" "golang.org/x/sync/errgroup" ) @@ -119,9 +120,11 @@ func (s *ConfigSuite) TestPeerLimit() { s.Require().NoError(testutil.WaitForBlocks(s.GetContext(), 4, s.Chain)) - metrics, err = s.getPrometheusMetrics(0) - s.Require().NoError(err) - s.Require().Equal(float64(2), metrics["cometbft_p2p_peers"].GetMetric()[0].GetGauge().GetValue()) + s.Require().EventuallyWithT(func(c *assert.CollectT) { + metrics, err = s.getPrometheusMetrics(0) + assert.NoError(c, err) + assert.Equal(c, float64(2), metrics["cometbft_p2p_peers"].GetMetric()[0].GetGauge().GetValue()) + }, 3*time.Minute, 10*time.Second) foundZero := false for i := 1; i < len(s.Chain.Validators); i++ {