Skip to content

Commit

Permalink
modify unit test to cover logbroadcaster enabled false
Browse files Browse the repository at this point in the history
  • Loading branch information
huangzhen1997 committed Sep 10, 2024
1 parent a71015d commit 7908e2a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion core/config/docs/chains-evm.toml
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ ObservationGracePeriod = '1s' # Default
[[EVM.Nodes]]
# Name is a unique (per-chain) identifier for this node.
Name = 'foo' # Example
# WSURL is the WS(S) endpoint for this node. Can be empty string when `LogBroadcasterEnabled` is `false`
# WSURL is the WS(S) endpoint for this node. Can be optional when `LogBroadcasterEnabled` is `false`
WSURL = 'wss://web.socket/test' # Example
# HTTPURL is the HTTP(S) endpoint for this node. Required for all nodes.
HTTPURL = 'https://foo.web' # Example
Expand Down
5 changes: 1 addition & 4 deletions core/services/chainlink/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1364,10 +1364,7 @@ func TestConfig_Validate(t *testing.T) {
- ChainType: invalid value (Arbitrum): must be one of arbitrum, astar, celo, gnosis, hedera, kroma, mantle, metis, optimismBedrock, scroll, wemix, xlayer, zkevm, zksync or omitted
- FinalityDepth: invalid value (0): must be greater than or equal to 1
- MinIncomingConfirmations: invalid value (0): must be greater than or equal to 1
- 3: 3 errors:
- logbroadcaster cannot be enabled unless all nodes have WSURL provided
- Nodes: missing: must have at least one ws uri when LogBroadcaster is enabled
- Nodes: 5 errors:
- 3.Nodes: 5 errors:
- 0: 2 errors:
- Name: missing: required for all nodes
- HTTPURL: empty: required for all nodes
Expand Down
1 change: 1 addition & 0 deletions core/services/chainlink/testdata/config-invalid.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ MinIncomingConfirmations = 0

[[EVM]]
ChainID = '99'
LogBroadcasterEnabled = false

[[EVM.Nodes]]
HTTPURl = ''
Expand Down
2 changes: 1 addition & 1 deletion docs/CONFIG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9137,7 +9137,7 @@ Name is a unique (per-chain) identifier for this node.
```toml
WSURL = 'wss://web.socket/test' # Example
```
WSURL is the WS(S) endpoint for this node. Can be empty string when `LogBroadcasterEnabled` is `false`
WSURL is the WS(S) endpoint for this node. Can be optional when `LogBroadcasterEnabled` is `false`

### HTTPURL
```toml
Expand Down

0 comments on commit 7908e2a

Please sign in to comment.