-
Notifications
You must be signed in to change notification settings - Fork 655
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
feat: adding hermes to e2e tests. #3408
Changes from all commits
67d95cf
a526e8c
a4475ed
f747125
ea35187
bf9252d
3fb3004
efb2244
394e531
921ec82
4e0db76
99d74b0
2bb1e3e
77bc38d
3dad322
f387da5
777fced
b56a20e
07b76fb
0c9afbb
7afcd2e
2ae97a3
e8ea7d4
c45be2a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,8 +15,10 @@ const ( | |
Rly = "rly" | ||
Hermes = "hermes" | ||
|
||
cosmosRelayerRepository = "damiannolan/rly" //"ghcr.io/cosmos/relayer" | ||
cosmosRelayerUser = "100:1000" // docker run -it --rm --entrypoint echo ghcr.io/cosmos/relayer "$(id -u):$(id -g)" | ||
hermesRelayerRepository = "ghcr.io/informalsystems/hermes" | ||
hermesRelayerUser = "1000:1000" | ||
rlyRelayerRepository = "damiannolan/rly" //"ghcr.io/cosmos/relayer" | ||
rlyRelayerUser = "100:1000" // docker run -it --rm --entrypoint echo ghcr.io/cosmos/relayer "$(id -u):$(id -g)" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think there's a public function for this now, but can't remember There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here we are There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. looked into this. Using a custom image (like we currently do) doesn't use the defaults. Can't use the defaults for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cool, once we switch off damian's image (probably after v7.1 release) then we can move to the defaults. Is there an issue to track this work? If not, maybe we can open an issue There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
yup! done with #3615 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. re: hermes image/tag updates done strangelove-ventures/interchaintest#571 |
||
) | ||
|
||
// Config holds configuration values for the relayer used in the tests. | ||
|
@@ -35,7 +37,7 @@ func New(t *testing.T, cfg Config, logger *zap.Logger, dockerClient *dockerclien | |
case Rly: | ||
return newCosmosRelayer(t, cfg.Tag, logger, dockerClient, network) | ||
case Hermes: | ||
return newHermesRelayer() | ||
return newHermesRelayer(t, cfg.Tag, logger, dockerClient, network) | ||
default: | ||
panic(fmt.Sprintf("unknown relayer specified: %s", cfg.Type)) | ||
} | ||
|
@@ -44,7 +46,7 @@ func New(t *testing.T, cfg Config, logger *zap.Logger, dockerClient *dockerclien | |
// newCosmosRelayer returns an instance of the go relayer. | ||
// Options are used to allow for relayer version selection and specifying the default processing option. | ||
func newCosmosRelayer(t *testing.T, tag string, logger *zap.Logger, dockerClient *dockerclient.Client, network string) ibc.Relayer { | ||
customImageOption := relayer.CustomDockerImage(cosmosRelayerRepository, tag, cosmosRelayerUser) | ||
customImageOption := relayer.CustomDockerImage(rlyRelayerRepository, tag, rlyRelayerUser) | ||
relayerProcessingOption := relayer.StartupFlags("-p", "events") // relayer processes via events | ||
|
||
relayerFactory := interchaintest.NewBuiltinRelayerFactory(ibc.CosmosRly, logger, customImageOption, relayerProcessingOption) | ||
|
@@ -55,8 +57,13 @@ func newCosmosRelayer(t *testing.T, tag string, logger *zap.Logger, dockerClient | |
} | ||
|
||
// newHermesRelayer returns an instance of the hermes relayer. | ||
func newHermesRelayer() ibc.Relayer { | ||
panic("hermes relayer not yet implemented for interchaintest") | ||
func newHermesRelayer(t *testing.T, tag string, logger *zap.Logger, dockerClient *dockerclient.Client, network string) ibc.Relayer { | ||
customImageOption := relayer.CustomDockerImage(hermesRelayerRepository, tag, hermesRelayerUser) | ||
relayerFactory := interchaintest.NewBuiltinRelayerFactory(ibc.Hermes, logger, customImageOption) | ||
|
||
return relayerFactory.Build( | ||
t, dockerClient, network, | ||
) | ||
} | ||
|
||
// RelayerMap is a mapping from test names to a relayer set for that test. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,13 +4,13 @@ import ( | |
"context" | ||
"fmt" | ||
"strings" | ||
"time" | ||
|
||
dockerclient "github.com/docker/docker/client" | ||
interchaintest "github.com/strangelove-ventures/interchaintest/v7" | ||
"github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" | ||
"github.com/strangelove-ventures/interchaintest/v7/ibc" | ||
"github.com/strangelove-ventures/interchaintest/v7/testreporter" | ||
test "github.com/strangelove-ventures/interchaintest/v7/testutil" | ||
"github.com/stretchr/testify/suite" | ||
"go.uber.org/zap" | ||
"go.uber.org/zap/zaptest" | ||
|
@@ -128,7 +128,7 @@ func (s *E2ETestSuite) SetupChainsRelayerAndChannel(ctx context.Context, channel | |
} | ||
}) | ||
// wait for relayer to start. | ||
time.Sleep(time.Second * 10) | ||
s.Require().NoError(test.WaitForBlocks(ctx, 10, chainA, chainB), "failed to wait for blocks") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is what we will be able to remove in the future right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Considering this was in place with |
||
} | ||
|
||
s.InitGRPCClients(chainA) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be changed back?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope, these are used when creating the relayer in
newHermesRelayer
:ibc-go/e2e/relayer/relayer.go
Line 61 in 77bc38d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry I mean't the
damiannolan/rly
string?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, right, that's pending on cosmos/relayer#1102