Make matter switch tests backwards compatible down to lua libs v10
Type of Change
- [ ] WWST Certification Request
- If this is your first time contributing code:
- [ ] I have reviewed the README.md file
- [ ] I have reviewed the CODE_OF_CONDUCT.md file
- [ ] I have signed the CLA
- [ ] I plan on entering a WWST Certification Request or have entered a request through the WWST Certification console at developer.smartthings.com
- If this is your first time contributing code:
- [ ] Bug fix
- [ ] New feature
- [ ] Refactor
- [x] Test case update
Checklist
- [ ] I have performed a self-review of my code
- [ ] I have commented my code in hard-to-understand areas
- [ ] I have verified my changes by testing with a device or have communicated a plan for testing
- [ ] I am adding new behavior, such as adding a sub-driver, and have added and run new unit tests to cover the new behavior
Description of Change
Add backwards compatibility for matter switch test cases down to lua libs version v10. Most of the issues were from test cases expecting native handler registrations, which was added in v11. This PR also fixes a bug in the driver code for lua libs version v10 and lower, which prevented the energyMeter capability from being emitted.
It might be possible to extend support to even lower versions, but there are a few additional api changes that would need to be accounted for.
Also note that to run these tests against lower versions, any capabilities that are not available in that version of the lua libs would need to be manually added to prevent test failures.
Summary of Completed Tests
Channel deleted.
Test Results
66 files 424 suites 0s ⏱️ 2 195 tests 2 195 ✅ 0 💤 0 ❌ 3 721 runs 3 721 ✅ 0 💤 0 ❌
Results for commit 32a9f658.
:recycle: This comment has been updated with latest results.
| File | Coverage | |
|---|---|---|
| All files | 98% |
:white_check_mark: |
| /home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/aqara-cube/init.lua | 96% |
:white_check_mark: |
| /home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/embedded-cluster-utils.lua | 91% |
:white_check_mark: |
| /home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/eve-energy/init.lua | 91% |
:white_check_mark: |
Minimum allowed coverage is 90%
Generated by :monkey: cobertura-action against 32a9f658ebe00aef457e6b1ef0bf21393a0f492b
do you think this is worth a rebase? Should we close this? Just checking since it's been open for ~6 months.
do you think this is worth a rebase? Should we close this? Just checking since it's been open for ~6 months.
I would say probably not because backwards compatibility was broken by scripting engine changes. Closing