feat: add new deviceInfo feild for discovered AMT flag#1053
Open
ShradhaGupta31 wants to merge 1 commit into
Open
feat: add new deviceInfo feild for discovered AMT flag#1053ShradhaGupta31 wants to merge 1 commit into
ShradhaGupta31 wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## device-discovery-apis #1053 +/- ##
======================================================
Coverage 41.71% 41.71%
======================================================
Files 135 135
Lines 12488 12489 +1
======================================================
+ Hits 5209 5210 +1
Misses 6722 6722
Partials 557 557 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
d4090c2 to
e6757a7
Compare
There was a problem hiding this comment.
Pull request overview
Adds an optional deviceInfo.discovered field to the v1 DeviceInfo DTO and wires it through the partial-update merge path so PATCH requests can update it explicitly.
Changes:
- Added
DeviceInfo.Discovered *bool(json:"discovered,omitempty") to the v1 DTO. - Updated device partial-merge logic to support
deviceinfo.discoveredupdates. - Updated unit tests and the Postman “create device” sample payload to include/track the new field.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/usecase/devices/usecase.go | Adds a merge setter for the deviceinfo.discovered subfield during partial updates. |
| internal/usecase/devices/repo_test.go | Extends partial-update merge expectations to include discovered. |
| internal/entity/dto/v1/device.go | Introduces the new DeviceInfo.Discovered JSON field (omitempty). |
| internal/entity/dto/v1/device_test.go | Extends JSON round-trip coverage to assert discovered survives marshal/unmarshal. |
| internal/controller/httpapi/v1/devices_test.go | Ensures PATCH field-tracking and POST payload handling include deviceInfo.discovered. |
| integration-test/collections/console_mps_apis.postman_collection.json | Updates the device create example payload to include discovered. |
e6757a7 to
f201405
Compare
- add new deviceInfo field: discovered - update unit tests for DTO, controller, and usecase merge behavior - update Postman device create sample payload to include new fields Signed-off-by: ShradhaGupta31 <shradha.gupta@intel.com>
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.
Uh oh!
There was an error while loading. Please reload this page.