-
Notifications
You must be signed in to change notification settings - Fork 65
chore: add socket based tests for the new APIs #677
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds socket-based end-to-end tests for MQTT session and local channel APIs, enabling verification of exact byte streams sent and received without requiring actual broker or device connections.
Key Changes
- Introduced E2E tests for MQTT session using fake sockets to simulate broker communication
- Added E2E tests for LocalChannel using mock transports to simulate device connections
- Created test fixtures that mock socket-level communications while exercising real protocol encoding/decoding
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| tests/e2e/init.py | Package initialization for end-to-end tests |
| tests/e2e/test_mqtt_session.py | MQTT session tests with fake broker socket simulation, testing message publishing and receiving |
| tests/e2e/test_local_session.py | Local channel tests with mock transport connections, testing device connection handshake and command sending |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d370e9b to
e133ab9
Compare
This adds socket based tests for the new API so we can have tests that exercise the exact byte streams that are sent and received, similar to the old API. These currently are testing the lower level "session" and "channel" just to get the request infrastructure ready to be used in a real end to end device manaver tests. This violates our rule that tests align with a module, but this is an exception given its for end to end tests.
a495d26 to
6cbf35b
Compare
This adds socket based tests for the new API so we can have tests that exercise the exact byte streams that are sent and received, similar to the old API. These currently are testing the lower level "session" and "channel" just to get the request infrastructure ready to be used in a real end to end device manager tests (and will be extended to use #676).
This violates our rule that tests align with a module, but this is an exception given its for end to end tests. They are added to a separate module so that we don't always need to run them.