Skip to content

Commit

Permalink
chore: add network identifier to manager, one for each test
Browse files Browse the repository at this point in the history
  • Loading branch information
RafilxTenfen committed Jul 25, 2024
1 parent efc4deb commit 7ddfd8a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions test/e2e/configurer/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ var (
// TODO currently only one configuration is available. Consider testing upgrades
// when necessary
func NewBTCTimestampingConfigurer(t *testing.T, isDebugLogEnabled bool) (Configurer, error) {
containerManager, err := containers.NewManager(isDebugLogEnabled, false)
containerManager, err := containers.NewManager("btc-timestamp", isDebugLogEnabled, false)
if err != nil {
return nil, err
}
Expand All @@ -130,7 +130,7 @@ func NewBTCTimestampingConfigurer(t *testing.T, isDebugLogEnabled bool) (Configu
}

func NewIBCTransferConfigurer(t *testing.T, isDebugLogEnabled bool) (Configurer, error) {
containerManager, err := containers.NewManager(isDebugLogEnabled, false)
containerManager, err := containers.NewManager("ibc-transfer", isDebugLogEnabled, false)
if err != nil {
return nil, err
}
Expand All @@ -147,7 +147,7 @@ func NewIBCTransferConfigurer(t *testing.T, isDebugLogEnabled bool) (Configurer,

// NewBTCTimestampingPhase2Configurer returns a new Configurer for BTC timestamping service (phase 2).
func NewBTCTimestampingPhase2Configurer(t *testing.T, isDebugLogEnabled bool) (Configurer, error) {
containerManager, err := containers.NewManager(isDebugLogEnabled, false)
containerManager, err := containers.NewManager("btc-timestamping", isDebugLogEnabled, false)
if err != nil {
return nil, err
}
Expand All @@ -164,7 +164,7 @@ func NewBTCTimestampingPhase2Configurer(t *testing.T, isDebugLogEnabled bool) (C

// NewBTCTimestampingPhase2RlyConfigurer returns a new Configurer for BTC timestamping service (phase 2), using the Go relayer (rly).
func NewBTCTimestampingPhase2RlyConfigurer(t *testing.T, isDebugLogEnabled bool) (Configurer, error) {
containerManager, err := containers.NewManager(isDebugLogEnabled, true)
containerManager, err := containers.NewManager("btc-timestamping-rly", isDebugLogEnabled, true)
if err != nil {
return nil, err
}
Expand All @@ -181,7 +181,7 @@ func NewBTCTimestampingPhase2RlyConfigurer(t *testing.T, isDebugLogEnabled bool)

// NewBTCStakingConfigurer returns a new Configurer for BTC staking service
func NewBTCStakingConfigurer(t *testing.T, isDebugLogEnabled bool) (Configurer, error) {
containerManager, err := containers.NewManager(isDebugLogEnabled, false)
containerManager, err := containers.NewManager("btc-staking", isDebugLogEnabled, false)
if err != nil {
return nil, err
}
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/containers/containers.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type Manager struct {

// NewManager creates a new Manager instance and initializes
// all Docker specific utilities. Returns an error if initialization fails.
func NewManager(isDebugLogEnabled bool, isCosmosRelayer bool) (docker *Manager, err error) {
func NewManager(networkIdentifier string, isDebugLogEnabled bool, isCosmosRelayer bool) (docker *Manager, err error) {
docker = &Manager{
ImageConfig: NewImageConfig(isCosmosRelayer),
resources: make(map[string]*dockertest.Resource),
Expand All @@ -49,7 +49,7 @@ func NewManager(isDebugLogEnabled bool, isCosmosRelayer bool) (docker *Manager,
if err != nil {
return nil, err
}
docker.network, err = docker.pool.CreateNetwork("bbn-testnet")
docker.network, err = docker.pool.CreateNetwork(fmt.Sprintf("bbn-testnet-%s", networkIdentifier))
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 7ddfd8a

Please sign in to comment.