Skip to content
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

Replace int index with string literals for endpoint based maps #1715

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

HunsupJung
Copy link
Collaborator

@HunsupJung HunsupJung commented Oct 24, 2024

Check all that apply

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
  • Bug fix
  • New feature
  • Refactor

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

Some maps in matter-appliace and matter-evse driver to store supported values use integer value as index.
This can cause serialization issues when storing data store. More details regarding this is captured here: IOTE-4570
This change replaces integer to use string-based literal.

Summary of Completed Tests

Copy link

Duplicate profile check: Passed - no duplicate profiles detected.

Copy link

Test Results

   64 files    400 suites   0s ⏱️
1 989 tests 1 989 ✅ 0 💤 0 ❌
3 429 runs  3 429 ✅ 0 💤 0 ❌

Results for commit cf0d18b.

Copy link

matter-appliance_coverage.xml

File Coverage
All files 72%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-appliance/src/matter-oven/init.lua 85%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-appliance/src/matter-cook-top/init.lua 84%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-appliance/src/matter-extractor-hood/init.lua 98%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-appliance/src/matter-refrigerator/init.lua 66%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-appliance/src/matter-dishwasher/init.lua 68%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-appliance/src/embedded-cluster-utils.lua 45%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-appliance/src/matter-laundry/init.lua 69%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-appliance/src/init.lua 56%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-appliance/src/matter-microwave-oven/init.lua 82%

matter-evse_coverage.xml

File Coverage
All files 78%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-appliance/src/matter-oven/init.lua 85%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-appliance/src/matter-cook-top/init.lua 84%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-appliance/src/matter-extractor-hood/init.lua 98%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-appliance/src/matter-refrigerator/init.lua 66%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-appliance/src/matter-dishwasher/init.lua 68%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-appliance/src/embedded-cluster-utils.lua 45%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-appliance/src/matter-laundry/init.lua 69%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-appliance/src/init.lua 56%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-appliance/src/matter-microwave-oven/init.lua 82%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-evse/src/init.lua 79%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-evse/src/embedded_cluster_utils.lua 70%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against cf0d18b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant