@@ -305,7 +305,7 @@ def callback():
305
305
306
306
status = ext ._build_current_status ()
307
307
self .assertEqual (status .status , StatusValue .OK )
308
- self .assertIn ("OK: 3 NOK : 0" , status .message )
308
+ self .assertIn ("OK: 3 WARNING: 0 ERROR : 0" , status .message )
309
309
310
310
def test_endpoint_status_some_faulty_endpoints (self ):
311
311
ext = Extension ()
@@ -334,8 +334,8 @@ def callback():
334
334
status = ext ._build_current_status ()
335
335
self .assertEqual (status .status , StatusValue .WARNING )
336
336
self .assertIn (
337
- "OK: 1 NOK: 2 NOK_reported_errors: 4.5.6.7:80 - DEVICE_CONNECTION_ERROR "
338
- "Invalid authorization scheme 2, 6.7.8.9:80 - DEVICE_CONNECTION_ERROR Invalid authorization scheme 3" ,
337
+ "Endpoints OK: 1 WARNING: 0 ERROR: 2 Unhealthy endpoints: "
338
+ "4.5.6.7:80 - DEVICE_CONNECTION_ERROR Invalid authorization scheme 2, 6.7.8.9:80 - DEVICE_CONNECTION_ERROR Invalid authorization scheme 3" ,
339
339
status .message ,
340
340
)
341
341
@@ -368,9 +368,8 @@ def callback():
368
368
status = ext ._build_current_status ()
369
369
self .assertEqual (status .status , StatusValue .GENERIC_ERROR )
370
370
self .assertIn (
371
- "OK: 0 NOK: 3 NOK_reported_errors: 1.2.3.4:80 - AUTHENTICATION_ERROR "
372
- "Invalid authorization scheme 4, 4.5.6.7:80 - DEVICE_CONNECTION_ERROR "
373
- "Invalid authorization scheme 5, 6.7.8.9:80 - DEVICE_CONNECTION_ERROR Invalid authorization scheme 6" ,
371
+ "Endpoints OK: 0 WARNING: 0 ERROR: 3 Unhealthy endpoints: 1.2.3.4:80 - AUTHENTICATION_ERROR Invalid authorization scheme 4, "
372
+ "4.5.6.7:80 - DEVICE_CONNECTION_ERROR Invalid authorization scheme 5, 6.7.8.9:80 - DEVICE_CONNECTION_ERROR Invalid authorization scheme 6" ,
374
373
status .message ,
375
374
)
376
375
@@ -391,7 +390,7 @@ def callback():
391
390
392
391
status = ext ._build_current_status ()
393
392
self .assertEqual (status .status , StatusValue .OK )
394
- self .assertNotIn ("OK: 0 NOK: 0 " , status .message )
393
+ self .assertNotIn ("Endpoints " , status .message )
395
394
396
395
def test_endpoint_status_single_warning (self ):
397
396
ext = Extension ()
@@ -414,7 +413,8 @@ def callback():
414
413
status = ext ._build_current_status ()
415
414
self .assertEqual (status .status , StatusValue .WARNING )
416
415
self .assertIn (
417
- "OK: 0 NOK: 1 NOK_reported_errors: 1.2.3.4:80 - WARNING Invalid authorization scheme A" , status .message
416
+ "Endpoints OK: 0 WARNING: 1 ERROR: 0 Unhealthy endpoints: 1.2.3.4:80 - WARNING Invalid authorization scheme A" ,
417
+ status .message ,
418
418
)
419
419
420
420
def test_endpoint_status_single_error (self ):
@@ -438,7 +438,7 @@ def callback():
438
438
status = ext ._build_current_status ()
439
439
self .assertEqual (status .status , StatusValue .GENERIC_ERROR )
440
440
self .assertIn (
441
- "OK: 0 NOK: 1 NOK_reported_errors : 1.2.3.4:80 - AUTHENTICATION_ERROR Invalid authorization scheme" ,
441
+ "OK: 0 WARNING: 0 ERROR: 1 Unhealthy endpoints : 1.2.3.4:80 - AUTHENTICATION_ERROR Invalid authorization scheme" ,
442
442
status .message ,
443
443
)
444
444
@@ -467,7 +467,7 @@ def callback_ep_status_2():
467
467
468
468
status = ext ._build_current_status ()
469
469
self .assertEqual (status .status , StatusValue .OK )
470
- self .assertIn ("OK: 3 NOK : 0" , status .message )
470
+ self .assertIn ("OK: 3 WARNING: 0 ERROR : 0" , status .message )
471
471
472
472
def test_endpoint_merge_error (self ):
473
473
def callback_ep_status_1 ():
@@ -494,7 +494,7 @@ def callback_ep_status_2():
494
494
status = ext ._build_current_status ()
495
495
self .assertEqual (status .status , StatusValue .GENERIC_ERROR )
496
496
self .assertIn (
497
- "OK: 0 NOK: 2 NOK_reported_errors : EP_HINT_1 - AUTHENTICATION_ERROR EP1 MSG, EP_HINT_2 - INVALID_CONFIG_ERROR EP2 MSG" ,
497
+ "OK: 0 WARNING: 0 ERROR: 2 Unhealthy endpoints : EP_HINT_1 - AUTHENTICATION_ERROR EP1 MSG, EP_HINT_2 - INVALID_CONFIG_ERROR EP2 MSG" ,
498
498
status .message ,
499
499
)
500
500
@@ -522,7 +522,7 @@ def callback_ep_status_2():
522
522
523
523
status = ext ._build_current_status ()
524
524
self .assertEqual (status .status , StatusValue .WARNING )
525
- self .assertIn ("OK: 1 NOK : 1 NOK_reported_errors : EP_HINT_2 - WARNING EP2 MSG" , status .message )
525
+ self .assertIn ("OK: 1 WARNING : 1 ERROR: 0 Unhealthy endpoints : EP_HINT_2 - WARNING EP2 MSG" , status .message )
526
526
527
527
def test_overall_status_error (self ):
528
528
def callback_ep_status ():
@@ -554,7 +554,7 @@ def callback_status():
554
554
status = ext ._build_current_status ()
555
555
self .assertEqual (status .status , StatusValue .GENERIC_ERROR )
556
556
self .assertIn (
557
- "Endpoints OK: 0 NOK: 1 NOK_reported_errors : EP_HINT - UNKNOWN_ERROR EP MSG"
557
+ "Endpoints OK: 0 WARNING: 0 ERROR: 1 Unhealthy endpoints : EP_HINT - UNKNOWN_ERROR EP MSG"
558
558
"\n callback_multistatus: GENERIC_ERROR - MULTI MSG\n callback_status: EEC_CONNECTION_ERROR - STATUS MSG" ,
559
559
status .message ,
560
560
)
@@ -588,7 +588,7 @@ def callback_status():
588
588
589
589
status = ext ._build_current_status ()
590
590
self .assertEqual (status .status , StatusValue .OK )
591
- self .assertIn ("Endpoints OK: 1 NOK : 0\n callback_status: OK - STATUS MSG" , status .message )
591
+ self .assertIn ("Endpoints OK: 1 WARNING: 0 ERROR : 0\n callback_status: OK - STATUS MSG" , status .message )
592
592
593
593
def test_overall_status_warning_1 (self ):
594
594
def callback_ep_status ():
@@ -620,7 +620,7 @@ def callback_status():
620
620
status = ext ._build_current_status ()
621
621
self .assertEqual (status .status , StatusValue .WARNING )
622
622
self .assertIn (
623
- "Endpoints OK: 0 NOK : 1 NOK_reported_errors : EP_HINT - WARNING EP MSG\n callback_multistatus: OK - MULTI MSG" ,
623
+ "Endpoints OK: 0 WARNING : 1 ERROR: 0 Unhealthy endpoints : EP_HINT - WARNING EP MSG\n callback_multistatus: OK - MULTI MSG" ,
624
624
status .message ,
625
625
)
626
626
@@ -654,8 +654,9 @@ def callback_status():
654
654
status = ext ._build_current_status ()
655
655
self .assertEqual (status .status , StatusValue .WARNING )
656
656
self .assertIn (
657
- "Endpoints OK: 0 NOK: 1 NOK_reported_errors: EP_HINT - INVALID_CONFIG_ERROR "
658
- "\n callback_multistatus: GENERIC_ERROR - \n callback_status: WARNING - " ,
657
+ "Endpoints OK: 0 WARNING: 0 ERROR: 1 Unhealthy endpoints: EP_HINT - INVALID_CONFIG_ERROR "
658
+ "\n callback_multistatus: GENERIC_ERROR - "
659
+ "\n callback_status: WARNING - " ,
659
660
status .message ,
660
661
)
661
662
@@ -711,7 +712,7 @@ def scheduler_thread_impl(ext: Extension):
711
712
self .assertEqual (status .status , StatusValue .GENERIC_ERROR )
712
713
self .assertIn (
713
714
(
714
- "Endpoints OK: 0 NOK: 2 NOK_reported_errors : "
715
+ "Endpoints OK: 0 WARNING: 0 ERROR: 2 Unhealthy endpoints : "
715
716
"skipped_callback - GENERIC_ERROR skipped_callback_msg, regular_callback - UNKNOWN_ERROR regular_callback_msg"
716
717
),
717
718
status .message ,
0 commit comments