From 68c72d8a11c63b4bd1aeb0603d9283a9b37088f1 Mon Sep 17 00:00:00 2001 From: Simon Noetzlin Date: Mon, 27 Jan 2025 10:47:59 +0100 Subject: [PATCH] add neutron ictest commands to Makefile --- Makefile | 36 +++++++++++++++++++++++++++++ tests/interchain/go.mod | 2 +- tests/interchain/ictests-neutron.sh | 13 ----------- 3 files changed, 37 insertions(+), 14 deletions(-) delete mode 100755 tests/interchain/ictests-neutron.sh diff --git a/Makefile b/Makefile index 9aec35674d..c541952107 100644 --- a/Makefile +++ b/Makefile @@ -66,6 +66,19 @@ test-interchain: CONSUMER_IMAGE_TAG=$(CONSUMER_IMAGE_TAG) \ go test ./... -timeout 30m -v +# run interchain tests 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. +test-interchain-neutron: + cd tests/interchain && \ + 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" \ + go test -run TestProviderConsumersSuite -count=1 -v -timeout 30m + # run mbt tests test-mbt: cd tests/mbt/driver;\ @@ -288,3 +301,26 @@ build-testing-docs: e2e-traces: cd tests/e2e; go test -timeout 30s -run ^TestWriteExamples -v + + +############################################################################### +### Heighliner ### +############################################################################### + +TAG ?= latest +GO_VERSION ?= 1.22 + +# Currently use a Heighliner fork until https://github.com/strangelove-ventures/heighliner/pull/313 is merged +FORK_REPO := https://github.com/sainoe/heighliner.git +FORK_DIR := ./tools/heighliner +FORK_VERSION := 9b5bbdfda4bb6c5f5c10e2303aaa866f0f8893c3 + +build-heighliner-image: +ifeq (,$(shell which heighliner)) + @echo "Installing Heighliner..." + git clone $(FORK_REPO) $(FORK_DIR) + cd $(FORK_DIR) && git fetch && git checkout $(FORK_VERSION) && make install + rm -rf $(FORK_DIR) +endif + @echo "Building $(IMAGE)..." + @heighliner build -c $(IMAGE) --git-ref $(TAG) --go-version $(GO_VERSION) diff --git a/tests/interchain/go.mod b/tests/interchain/go.mod index ace8820ddd..05afff1600 100644 --- a/tests/interchain/go.mod +++ b/tests/interchain/go.mod @@ -293,5 +293,5 @@ replace ( // Remove this when strangelove-ventures updates the interchain tests to import ICS v6 github.com/strangelove-ventures/interchaintest/v8 => github.com/sainoe/interchaintest/v8 v8.0.0-20250124160703-058a72282f21 github.com/vedhavyas/go-subkey => github.com/strangelove-ventures/go-subkey v1.0.7 - + ) diff --git a/tests/interchain/ictests-neutron.sh b/tests/interchain/ictests-neutron.sh deleted file mode 100755 index 82e67374ec..0000000000 --- a/tests/interchain/ictests-neutron.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -docker stop $(docker ps -aq) && docker rm $(docker ps -aq) - -KEEP_CONTAINERS=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" \ -go test -timeout 30s -run ^TestProviderConsumersSuite$ cosmos/interchain-security/tests/interchain -count=1 -v -timeout 24h \ No newline at end of file