Skip to content

Commit 2016e62

Browse files
committed
fix tests
1 parent 5fb1cf4 commit 2016e62

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

framework/components/simple_node_set/node_set.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ type Input struct {
2323
Nodes int `toml:"nodes" validate:"required"`
2424
HTTPPortRangeStart int `toml:"http_port_range_start"`
2525
P2PPortRangeStart int `toml:"p2p_port_range_start"`
26+
DlvPortRangeStart int `toml:"dlv_port_range_start"`
2627
OverrideMode string `toml:"override_mode" validate:"required,oneof=all each"`
2728
DbInput *postgres.Input `toml:"db" validate:"required"`
2829
NodeSpecs []*clnode.Input `toml:"node_specs" validate:"required"`
@@ -88,13 +89,17 @@ func sharedDBSetup(in *Input, bcOut *blockchain.Output) (*Output, error) {
8889
var (
8990
httpPortRangeStart = DefaultHTTPPortStaticRangeStart
9091
p2pPortRangeStart = DefaultP2PStaticRangeStart
92+
dlvPortStart = clnode.DefaultDebuggerPort
9193
)
9294
if in.HTTPPortRangeStart != 0 {
9395
httpPortRangeStart = in.HTTPPortRangeStart
9496
}
9597
if in.P2PPortRangeStart != 0 {
9698
p2pPortRangeStart = in.P2PPortRangeStart
9799
}
100+
if in.DlvPortRangeStart != 0 {
101+
dlvPortStart = in.DlvPortRangeStart
102+
}
98103

99104
eg := &errgroup.Group{}
100105
mu := &sync.Mutex{}
@@ -129,7 +134,7 @@ func sharedDBSetup(in *Input, bcOut *blockchain.Output) (*Output, error) {
129134
Node: &clnode.NodeInput{
130135
HTTPPort: httpPortRangeStart + i,
131136
P2PPort: p2pPortRangeStart + i,
132-
DebuggerPort: clnode.DefaultDebuggerPort + i,
137+
DebuggerPort: dlvPortStart + i,
133138
CustomPorts: in.NodeSpecs[overrideIdx].Node.CustomPorts,
134139
Image: in.NodeSpecs[overrideIdx].Node.Image,
135140
Name: nodeName,

framework/components/simple_node_set/nodeset_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ func TestComponentDockerNodeSetSharedDB(t *testing.T) {
7878
OverrideMode: "each",
7979
HTTPPortRangeStart: 20000,
8080
P2PPortRangeStart: 22000,
81+
DlvPortRangeStart: 45000,
8182
DbInput: &postgres.Input{
8283
Image: "postgres:12.0",
8384
Port: 14000,

0 commit comments

Comments
 (0)