@@ -279,8 +279,8 @@ func TestRegistry(t *testing.T) {
279
279
t .Error ("UnregisterHandler should error for protected handler" )
280
280
}
281
281
282
- if ! strings .Contains (err .Error (), "cannot unregister protected handler " ) {
283
- t .Errorf ("Error message should mention protected handler, got: %v" , err )
282
+ if ! strings .Contains (err .Error (), "handler is protected" ) {
283
+ t .Errorf ("Error message should mention handler is protected , got: %v" , err )
284
284
}
285
285
286
286
// Handler should still be there
@@ -491,7 +491,7 @@ func TestVoidProcessor(t *testing.T) {
491
491
t .Error ("VoidProcessor RegisterHandler should return error" )
492
492
}
493
493
494
- if ! strings .Contains (err .Error (), "cannot register push notification handler " ) {
494
+ if ! strings .Contains (err .Error (), "register failed " ) {
495
495
t .Errorf ("Error message should mention registration failure, got: %v" , err )
496
496
}
497
497
@@ -508,7 +508,7 @@ func TestVoidProcessor(t *testing.T) {
508
508
t .Error ("VoidProcessor UnregisterHandler should return error" )
509
509
}
510
510
511
- if ! strings .Contains (err .Error (), "cannot unregister push notification handler " ) {
511
+ if ! strings .Contains (err .Error (), "unregister failed " ) {
512
512
t .Errorf ("Error message should mention unregistration failure, got: %v" , err )
513
513
}
514
514
})
@@ -1466,7 +1466,7 @@ func TestErrors(t *testing.T) {
1466
1466
t .Error ("ErrHandlerExists should not return nil" )
1467
1467
}
1468
1468
1469
- expectedMsg := "cannot overwrite existing handler for push notification: TEST_NOTIFICATION "
1469
+ expectedMsg := "handler register failed for 'TEST_NOTIFICATION': cannot overwrite existing handler "
1470
1470
if err .Error () != expectedMsg {
1471
1471
t .Errorf ("ErrHandlerExists message should be '%s', got: %s" , expectedMsg , err .Error ())
1472
1472
}
@@ -1480,7 +1480,7 @@ func TestErrors(t *testing.T) {
1480
1480
t .Error ("ErrProtectedHandler should not return nil" )
1481
1481
}
1482
1482
1483
- expectedMsg := "cannot unregister protected handler for push notification: PROTECTED_NOTIFICATION "
1483
+ expectedMsg := "handler unregister failed for 'PROTECTED_NOTIFICATION': handler is protected "
1484
1484
if err .Error () != expectedMsg {
1485
1485
t .Errorf ("ErrProtectedHandler message should be '%s', got: %s" , expectedMsg , err .Error ())
1486
1486
}
@@ -1494,7 +1494,7 @@ func TestErrors(t *testing.T) {
1494
1494
t .Error ("ErrVoidProcessorRegister should not return nil" )
1495
1495
}
1496
1496
1497
- expectedMsg := "cannot register push notification handler 'VOID_TEST': push notifications are disabled (using void processor) "
1497
+ expectedMsg := "void_processor register failed for 'VOID_TEST': push notifications are disabled"
1498
1498
if err .Error () != expectedMsg {
1499
1499
t .Errorf ("ErrVoidProcessorRegister message should be '%s', got: %s" , expectedMsg , err .Error ())
1500
1500
}
@@ -1508,7 +1508,7 @@ func TestErrors(t *testing.T) {
1508
1508
t .Error ("ErrVoidProcessorUnregister should not return nil" )
1509
1509
}
1510
1510
1511
- expectedMsg := "cannot unregister push notification handler 'VOID_TEST': push notifications are disabled (using void processor) "
1511
+ expectedMsg := "void_processor unregister failed for 'VOID_TEST': push notifications are disabled"
1512
1512
if err .Error () != expectedMsg {
1513
1513
t .Errorf ("ErrVoidProcessorUnregister message should be '%s', got: %s" , expectedMsg , err .Error ())
1514
1514
}
0 commit comments