Repository navigation
Fix tests for zigpy's Green Power endpoint and broadcast - #293
Merged
Merged
Conversation
zigpy 2.4 registers the Green Power endpoint (242) on the coordinator and sends a Green Power broadcast on startup and when permitting joins. The test Z-Stack server had no handler for that broadcast, which failed ~137 application tests with `CommandNotRecognized`.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #293 +/- ##
==========================================
+ Coverage 98.54% 98.57% +0.02%
==========================================
Files 43 43
Lines 3582 3582
==========================================
+ Hits 3530 3531 +1
+ Misses 52 51 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
CI is red on
devand on every open PR (for example #292): 137 tests undertests/applicationfail. zigpy 2.4 registers the Green Power endpoint (242) on the coordinator and sends a Green Power broadcast (AF.DataRequestExtto0xFFFD, endpoint 242, cluster0x0021) on startup and when permitting joins. The test Z-Stack server had no handler for it, so the request failed withCommandNotRecognized.Requested in #292 (comment).
Changes
tests/conftest.py: the test server acknowledgesAF.DataRequestExtto the Green Power endpoint and cluster withSUCCESS.tests/application/test_startup.py:test_endpointsexpects the third registered endpoint (242).tests/application/test_joining.py: the permit-join broadcast now has TSN 4, since the Green Power broadcast takes TSN 3.No library code changes.
Testing
Full suite in a clean venv with zigpy 2.4.1: 396 passed (before: 137 failures on
dev).pre-commitpasses.