File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
tests/unit/cmk/base/plugins/agent_based Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -59,9 +59,9 @@ def check_jb_fls(params, section):
5959 yield Result (state = State .WARN , summary = 'Not healthy %s' % section .get ('health' , 'Unknown' ))
6060
6161 yield Result (state = State .OK , summary = 'Version: %s' % section .get ('currentVersion' , 'Unknown' ))
62- if section .get ('updateAvailable' , 'False' ) != 'False' and params .get ('updateAvailable' , 1 ):
62+ if section .get ('updateAvailable' , 'False' ) != 'False' and params .get ('updateAvailable' , 1 ) is not None :
6363 updateAvailableStatus = State (params .get ('updateAvailable' , 1 ))
64- yield Result (state = updateAvailableStatus , summary = 'update available' )
64+ yield Result (state = updateAvailableStatus , summary = 'update available to %s' % section . get ( 'latestVersion' , 'Unknown' ) )
6565
6666 for line in section .get ('connection' , []):
6767 state = State .OK if line [1 ] == 'OK' else State .CRIT
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ def test_discovery_jb_fls(section, result):
9494 [
9595 Result (state = State .OK , summary = 'Server: fooBar https://host:1212/ ' ),
9696 Result (state = State .OK , summary = 'Version: 1.2.3' ),
97- Result (state = State .WARN , summary = 'update available' ),
97+ Result (state = State .WARN , summary = 'update available to 1.2.4 ' ),
9898 Result (state = State .OK , notice = 'Connection to https://account.jetbrains.com is OK' ),
9999 Result (state = State .OK , summary = 'Last call home: 21 minutes 0 seconds' ),
100100 Metric ('age' , 1260 ),
You can’t perform that action at this time.
0 commit comments