Skip to content

Commit

Permalink
chore: fix misbehaviour test
Browse files Browse the repository at this point in the history
  • Loading branch information
chatton committed Jun 19, 2024
1 parent ce31c36 commit 0af42e9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions e2e/testsuite/diagnostics/diagnostics.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const (

// Collect can be used in `t.Cleanup` and will copy all the of the container logs and relevant files
// into e2e/<test-suite>/<test-name>.log. These log files will be uploaded to GH upon test failure.
func Collect(t *testing.T, dc *dockerclient.Client, debugModeEnabled bool, chainNames ...string) {
func Collect(t *testing.T, dc *dockerclient.Client, debugModeEnabled bool, suiteName string, chainNames ...string) {
t.Helper()

if !debugModeEnabled {
Expand All @@ -50,7 +50,7 @@ func Collect(t *testing.T, dc *dockerclient.Client, debugModeEnabled bool, chain
return
}

testContainers, err := dockerutil.GetTestContainers(ctx, t, dc)
testContainers, err := dockerutil.GetTestContainers(ctx, suiteName, dc)
if err != nil {
t.Logf("failed listing containers during test cleanup: %s", err)
return
Expand Down
11 changes: 8 additions & 3 deletions e2e/testsuite/testsuite.go
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ func (s *E2ETestSuite) createChains(chainOptions ChainOptions) []ibc.Chain {
for _, chain := range chainOptions.ChainSpecs {
chainNames = append(chainNames, chain.Name)
}
diagnostics.Collect(t, s.DockerClient, dumpLogs, chainNames...)
diagnostics.Collect(t, s.DockerClient, dumpLogs, s.testSuiteName, chainNames...)
})

chains, err := cf.Chains(t.Name())
Expand Down Expand Up @@ -618,8 +618,8 @@ func (s *E2ETestSuite) TransferChannelOptions() ibc.CreateChannelOptions {
return opts
}

// FeeMiddlewareChannelOptions configures both of the chains to have fee middleware enabled.
func (s *E2ETestSuite) FeeMiddlewareChannelOptions() ibc.CreateChannelOptions {
// FeeTransferChannelOptions configures both of the chains to have fee middleware enabled.
func (s *E2ETestSuite) FeeTransferChannelOptions() ibc.CreateChannelOptions {
versionMetadata := feetypes.Metadata{
FeeVersion: feetypes.Version,
AppVersion: determineDefaultTransferVersion(s.GetAllChains()),
Expand Down Expand Up @@ -720,6 +720,11 @@ func GetMsgTransfer(portID, channelID, version string, tokens sdk.Coins, sender,
return msg
}

// SuiteName returns the name of the test suite.
func (s *E2ETestSuite) SuiteName() string {
return s.testSuiteName
}

// ThreeChainSetup provides the default behaviour to wire up 3 chains in the tests.
func ThreeChainSetup() ChainOptionConfiguration {
// copy all values of existing chains and tweak to make unique to new chain.
Expand Down

0 comments on commit 0af42e9

Please sign in to comment.