File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -73,8 +73,8 @@ properties:
7373 description: "PEM-encoded client key"
7474
7575 capi.tps.watcher.debug_addr:
76- description: "address at which to serve debug info"
77- default: "127.0.0.1:17015 "
76+ description: "Address at which to serve debug info, e.g. 127.0.0.1:17015. Debug server is disabled if empty (default). "
77+ default: ""
7878 capi.tps.watcher.locket.api_location:
7979 description: "Hostname and port of the Locket server"
8080 default: ""
Original file line number Diff line number Diff line change @@ -17,6 +17,36 @@ module Test
1717 let ( :links ) { [ ] }
1818 let ( :template ) { job . template ( 'config/tps_watcher_config.json' ) }
1919
20+ describe 'debug server' do
21+ it 'disables the debug server by default' do
22+ rendered_template = template . render ( { } , consumes : links )
23+ parsed_template = JSON . parse ( rendered_template )
24+
25+ expect ( parsed_template [ 'debug_server_config' ] [ 'debug_address' ] ) . to eq ( '' )
26+ end
27+
28+ context 'when capi.tps.watcher.debug_addr is configured' do
29+ let ( :manifest_overrides ) do
30+ {
31+ 'capi' => {
32+ 'tps' => {
33+ 'watcher' => {
34+ 'debug_addr' => '127.0.0.1:17015'
35+ }
36+ }
37+ }
38+ }
39+ end
40+
41+ it 'sets the debug address' do
42+ rendered_template = template . render ( manifest_overrides , consumes : links )
43+ parsed_template = JSON . parse ( rendered_template )
44+
45+ expect ( parsed_template [ 'debug_server_config' ] [ 'debug_address' ] ) . to eq ( '127.0.0.1:17015' )
46+ end
47+ end
48+ end
49+
2050 describe 'log time format' do
2151 it 'defaults the log timestamp format to rfc3339' do
2252 rendered_template = template . render ( { } , consumes : links )
You can’t perform that action at this time.
0 commit comments