Skip to content

Commit

Permalink
ci(e2e): harden port selector (#966)
Browse files Browse the repository at this point in the history
Less regex to identify anvil service.

task: none
  • Loading branch information
corverroos authored Apr 29, 2024
1 parent b39f11a commit 7a7fe91
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions e2e/vmcompose/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ import (

"github.com/omni-network/omni/e2e/types"
"github.com/omni-network/omni/lib/errors"
"github.com/omni-network/omni/lib/evmchain"

e2e "github.com/cometbft/cometbft/test/e2e/pkg"
)

var evmRegx = regexp.MustCompile("(.*_evm|chain_.*|mock_.*)")
var omniEvmRegx = regexp.MustCompile(".*_evm")

const (
evmPort = 8545
Expand Down Expand Up @@ -64,7 +65,9 @@ func LoadData(path string) (types.InfrastructureData, error) {

// Default ports, as VMs don't support overlapping ports.
port := haloPort
if evmRegx.MatchString(serviceName) {
if omniEvmRegx.MatchString(serviceName) {
port = evmPort
} else if _, ok := evmchain.MetadataByName(serviceName); ok {
port = evmPort
} else if serviceName == relayer {
port = 0 // No port for relayer
Expand Down

0 comments on commit 7a7fe91

Please sign in to comment.