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

feat(metadata): add UoM validation to POST deviceresource API #4140

Merged
merged 2 commits into from
Sep 20, 2022
Merged

feat(metadata): add UoM validation to POST deviceresource API #4140

merged 2 commits into from
Sep 20, 2022

Conversation

chr1shung
Copy link
Member

fix #4138

Signed-off-by: Chris Hung chris@iotechsys.com

If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/edgex-go/blob/main/.github/Contributing.md

PR Checklist

Please check if your PR fulfills the following requirements:

  • I am not introducing a breaking change (if you are, flag in conventional commit message with BREAKING CHANGE: describing the break)
  • I am not introducing a new dependency (add notes below if you are)
  • I have added unit tests for the new feature or bug fix (if not, why?)
  • I have fully tested (add details below) this the new feature or bug fix (if not, why?)
  • I have opened a PR for the related docs change (if not, why?)

Testing Instructions

  1. Run metadata from this branch with WRITABLE_UOM_VALIDATION=true environment variable
  2. Verify POST /api/v2/deviceprofile/resource API is validating device resource units against uom.toml as expected

New Dependency Instructions (If applicable)

fix #4138

Signed-off-by: Chris Hung <chris@iotechsys.com>
@codecov-commenter
Copy link

Codecov Report

Merging #4140 (86addf0) into main (d9dcee9) will decrease coverage by 0.03%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main    #4140      +/-   ##
==========================================
- Coverage   43.65%   43.61%   -0.04%     
==========================================
  Files         121      121              
  Lines       10691    10700       +9     
==========================================
  Hits         4667     4667              
- Misses       5624     5633       +9     
  Partials      400      400              
Impacted Files Coverage Δ
...ternal/core/metadata/application/deviceresource.go 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Signed-off-by: Chris Hung <chris@iotechsys.com>
@sonarcloud
Copy link

sonarcloud bot commented Sep 20, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Member

@cloudxxx8 cloudxxx8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

POST device resource didn't validate Units of Measure
3 participants