1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-29 17:41:15 +03:00

Fixes tests:

- TestClientWithoutPushNotifications: Now expects error instead of nil
- TestClientPushNotificationEdgeCases: Now expects error instead of nil
This commit is contained in:
Nedyalko Dyakov
2025-06-27 16:47:07 +03:00
parent 91805bc506
commit e31987f25e
2 changed files with 20 additions and 9 deletions

View File

@ -103,8 +103,9 @@ func (v *VoidProcessor) GetHandler(pushNotificationName string) Handler {
}
// RegisterHandler returns an error for void processor since it doesn't maintain handlers.
// This helps developers identify when they're trying to register handlers on disabled push notifications.
func (v *VoidProcessor) RegisterHandler(pushNotificationName string, handler Handler, protected bool) error {
return fmt.Errorf("void push notification processor does not support handler registration")
return fmt.Errorf("cannot register push notification handler '%s': push notifications are disabled (using void processor)", pushNotificationName)
}
// GetRegistryForTesting returns nil for void processor since it doesn't maintain handlers.