Skip to content

Commit

Permalink
ci: Fixes to get interchaintest to run on v22 (#3433)
Browse files Browse the repository at this point in the history
  • Loading branch information
fastfadingviolets authored Dec 4, 2024
1 parent 7e85d80 commit 137a3b9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
7 changes: 7 additions & 0 deletions tests/interchain/chainsuite/chain_ics.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion tests/interchain/chainsuite/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions tests/interchain/validator/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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++ {
Expand Down

0 comments on commit 137a3b9

Please sign in to comment.