Skip to content

Commit 63d0cf0

Browse files
committed
describe overrides in code and TOML, add docs about custom ports
1 parent 32f8353 commit 63d0cf0

File tree

4 files changed

+18
-6
lines changed

4 files changed

+18
-6
lines changed

book/src/framework/components/chainlink/node.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Here we provide full configuration reference, if you want to copy and run it, pl
2121
pull_image = true
2222

2323
[cl_node.node]
24+
# custom ports that plugins may need to expose and map to the host machine
25+
custom_ports = [14000, 140001]
2426
# A list of paths to capability binaries
2527
capabilities = ["./capability_1", "./capability_2"]
2628
# Default capabilities directory inside container

book/src/framework/components/chainlink/nodeset.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ Then configure NodeSet
6868
volume_name = ""
6969

7070
[nodeset.node_specs.node]
71+
# custom ports that plugins may need to expose and map to the host machine
72+
custom_ports = [14000, 140001]
7173
# A list of paths to capability binaries
7274
capabilities = ["./capability_1", "./capability_2"]
7375
# Default capabilities directory inside container

book/src/framework/test_configuration_overrides.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,14 @@ This helps reduce duplication in the configuration.
6868
6969
> [!WARNING]
7070
> When override slices remember that you should replace the full slice, it won't be extended by default!
71+
72+
## Overriding Components Configuration
73+
74+
The same override logic applies across components, files, and configuration fields in code, configs are applied in order:
75+
76+
1. Implicit component defaults that are defined inside application
77+
2. Component defaults defined in the framework or external component, ex.: [CLNode](https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/framework/components/clnode/default.go)
78+
3. `Test.*Override`
79+
4. `user_.*_overrides`
80+
81+
Use `Test.*Override` in test `code` to override component configurations, and `user_.*_overrides` in `TOML` for the same purpose.

framework/components/simple_node_set/node_set.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ const (
2020
// Input is a node set configuration input
2121
type Input struct {
2222
Nodes int `toml:"nodes" validate:"required"`
23-
SkipNetworkConfig bool `toml:"skip_network_config"`
2423
HTTPPortRangeStart int `toml:"http_port_range_start"`
2524
P2PPortRangeStart int `toml:"p2p_port_range_start"`
2625
OverrideMode string `toml:"override_mode" validate:"required,oneof=all each"`
@@ -118,11 +117,9 @@ func sharedDBSetup(in *Input, bcOut *blockchain.Output, fakeUrl string, override
118117
}
119118
eg.Go(func() error {
120119
var net string
121-
if !in.SkipNetworkConfig {
122-
net, err = clnode.NewNetworkCfgOneNetworkAllNodes(bcOut)
123-
if err != nil {
124-
return err
125-
}
120+
net, err = clnode.NewNetworkCfgOneNetworkAllNodes(bcOut)
121+
if err != nil {
122+
return err
126123
}
127124

128125
nodeSpec := &clnode.Input{

0 commit comments

Comments
 (0)