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

Don't pin relayer image to main #1727

Merged
merged 2 commits into from
Jul 19, 2022
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
3 changes: 3 additions & 0 deletions .github/workflows/e2e-fork.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ jobs:
with:
go-version: 1.18
- name: Run e2e Test
env:
# see images here https://github.com/cosmos/relayer/pkgs/container/relayer/versions
RLY_TAG: "v2.0.0-rc2"
run: |
cd e2e
make e2e-test suite=${{ matrix.suite }} test=${{ matrix.test }}
2 changes: 2 additions & 0 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ jobs:
env:
SIMD_TAG: ${{ needs.determine-image-tag.outputs.simd-tag }}
SIMD_IMAGE: ghcr.io/cosmos/ibc-go-simd-e2e
# see images here https://github.com/cosmos/relayer/pkgs/container/relayer/versions
RLY_TAG: "v2.0.0-rc2"
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.build-test-matrix.outputs.matrix) }}
Expand Down
10 changes: 10 additions & 0 deletions e2e/testconfig/testconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,16 @@ const (
DefaultSimdImage = "ghcr.io/cosmos/ibc-go-simd-e2e"
SimdImageEnv = "SIMD_IMAGE"
SimdTagEnv = "SIMD_TAG"
GoRelayerTag = "RLY_TAG"

defaultRlyTag = "main"
)

// TestConfig holds various fields used in the E2E tests.
type TestConfig struct {
SimdImage string
SimdTag string
RlyTag string
}

// FromEnv returns a TestConfig constructed from environment variables.
Expand All @@ -31,9 +35,15 @@ func FromEnv() TestConfig {
panic(fmt.Sprintf("must specify simd version for test with environment variable [%s]", SimdTagEnv))
}

rlyTag, ok := os.LookupEnv(GoRelayerTag)
if !ok {
rlyTag = defaultRlyTag
}

return TestConfig{
SimdImage: simdImage,
SimdTag: simdTag,
RlyTag: rlyTag,
}
}

Expand Down
6 changes: 4 additions & 2 deletions e2e/testsuite/relayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package testsuite
import (
"testing"

"e2e/testconfig"

dockerclient "github.com/docker/docker/client"
"github.com/strangelove-ventures/ibctest"
"github.com/strangelove-ventures/ibctest/ibc"
Expand All @@ -15,8 +17,8 @@ const (
)

// newCosmosRelayer returns an instance of the go relayer.
func newCosmosRelayer(t *testing.T, logger *zap.Logger, dockerClient *dockerclient.Client, network string) ibc.Relayer {
return ibctest.NewBuiltinRelayerFactory(ibc.CosmosRly, logger, relayer.CustomDockerImage(cosmosRelayerRepository, "main")).Build(
func newCosmosRelayer(t *testing.T, tc testconfig.TestConfig, logger *zap.Logger, dockerClient *dockerclient.Client, network string) ibc.Relayer {
return ibctest.NewBuiltinRelayerFactory(ibc.CosmosRly, logger, relayer.CustomDockerImage(cosmosRelayerRepository, tc.RlyTag)).Build(
t, dockerClient, network,
)
}
2 changes: 1 addition & 1 deletion e2e/testsuite/testsuite.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (s *E2ETestSuite) SetupChainsRelayerAndChannel(ctx context.Context, channel
home, err := ioutil.TempDir("", "")
s.Require().NoError(err)

r := newCosmosRelayer(s.T(), s.logger, s.DockerClient, s.network)
r := newCosmosRelayer(s.T(), testconfig.FromEnv(), s.logger, s.DockerClient, s.network)

pathName := fmt.Sprintf("%s-path", s.T().Name())
pathName = strings.ReplaceAll(pathName, "/", "-")
Expand Down