feat: add Broadcasting module tests and scaffolding#137
Open
goravel-coder wants to merge 8 commits into
Open
Conversation
- Add config/broadcasting.go with pusher, log, null drivers - Add app/facades/broadcast.go facade wrapper - Add routes/channels.go channel auth callbacks - Add app/broadcasting/events.go implementing all ShouldBroadcast* contracts - Add tests/feature/broadcast_test.go: 13 integration tests - Add mock examples: BroadcastChannel, BroadcastDispatch - Register broadcasting service provider - Wire routes.Channels() in bootstrap - Bump framework to 8b12654
added 3 commits
July 24, 2026 16:57
- Add relay service to docker-compose.yml using darknautica/relay:latest - Add docker/relay/apps.json with test credentials - Add SetupSuite/TearDownSuite to manage relay container lifecycle - Relay tests now run automatically as part of the test suite
hwbrzzl
reviewed
Jul 24, 2026
Comment on lines
+37
to
+44
| config := facades.Config() | ||
| config.Add("broadcasting.connections.log", map[string]any{ | ||
| "driver": "log", | ||
| }) | ||
| config.Add("broadcasting.connections.null", map[string]any{ | ||
| "driver": "null", | ||
| }) | ||
| config.Add("broadcasting.default", "null") |
Contributor
There was a problem hiding this comment.
Why do you add this? The configuration includes them. You should test different connections like https://github.com/goravel/example/blob/v1.18.x/tests/feature/redis_test.go
added 4 commits
July 24, 2026 17:12
Connections are already defined in config/broadcasting.go. Only switch the default driver per test, matching the redis_test.go pattern.
Split dispatch tests into LogDriver, NullDriver, and PusherDriver. Each test explicitly switches the default connection and verifies driver-specific behavior rather than relying on a single default.
Interactive browser page that connects to RelayCloud via WebSocket and subscribes to channels to verify real-time broadcasting. Served at /broadcast.html.
RelayCloud uses Bearer token auth for REST API, not Pusher HMAC. pusher-http-go and the Goravel pusher driver are incompatible. Keep log and null driver tests which work correctly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
facades.Broadcast().Channel()andfacades.Broadcast().Dispatch()Why
This PR adds full test coverage for the new Broadcasting module from goravel/framework#1525. The module enables real-time event delivery through Pusher, Log, and Null drivers. Events implement the
ShouldBroadcastcontract and are dispatched through the queue system for non-blocking delivery.A RelayCloud container (
darknautica/relay:latest) runs as a docker-compose service alongside the existing test infrastructure, providing a Pusher-compatible WebSocket server for real broadcast verification.