Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions framework/.changeset/v0.10.17.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Expose a function that is used to name containers in simple node set
8 changes: 5 additions & 3 deletions framework/components/simple_node_set/node_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ func NewSharedDBNodeSet(in *Input, bcOut *blockchain.Output) (*Output, error) {
return out, nil
}

func NodeNamePrefix(nodeSetName string) string {
return nodeSetName + "-" + "node"
}

func printURLs(out *Output) {
if out == nil {
return
Expand Down Expand Up @@ -113,7 +117,6 @@ func sharedDBSetup(in *Input, bcOut *blockchain.Output) (*Output, error) {
mu := &sync.Mutex{}
for i := 0; i < in.Nodes; i++ {
overrideIdx := i
var nodeName string
if in.OverrideMode == "all" {
if len(in.NodeSpecs[overrideIdx].Node.CustomPorts) > 0 {
return nil, fmt.Errorf("custom_ports can be used only with override_mode = 'each'")
Expand All @@ -132,8 +135,7 @@ func sharedDBSetup(in *Input, bcOut *blockchain.Output) (*Output, error) {
if in.NodeSpecs[overrideIdx].Node.TestConfigOverrides != "" {
net = in.NodeSpecs[overrideIdx].Node.TestConfigOverrides
}
nodeName = fmt.Sprintf("node%d", i)
nodeWithNodeSetPrefixName := fmt.Sprintf("%s-%s", in.Name, nodeName)
nodeWithNodeSetPrefixName := NodeNamePrefix(in.Name) + fmt.Sprint(i)

nodeSpec := &clnode.Input{
NoDNS: in.NoDNS,
Expand Down
Loading