Skip to content

feat: add new deviceInfo feild for discovered AMT flag#1053

Open
ShradhaGupta31 wants to merge 1 commit into
device-discovery-apisfrom
add-device-api-new-parms
Open

feat: add new deviceInfo feild for discovered AMT flag#1053
ShradhaGupta31 wants to merge 1 commit into
device-discovery-apisfrom
add-device-api-new-parms

Conversation

@ShradhaGupta31
Copy link
Copy Markdown
Contributor

@ShradhaGupta31 ShradhaGupta31 commented Jun 5, 2026

  • add new deviceInfo fields: discovered
  • update unit tests for DTO, controller, and usecase merge behavior
  • update Postman device create sample payload to include new fields

@ShradhaGupta31 ShradhaGupta31 requested a review from a team as a code owner June 5, 2026 06:19
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 41.71%. Comparing base (6d538fb) to head (f201405).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.discovered updates.
  • 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.

Comment thread internal/usecase/devices/repo_test.go Outdated
Comment thread internal/entity/dto/v1/device.go
@ShradhaGupta31 ShradhaGupta31 changed the title feat: add deviceInfo skutype and discovered fields feat: add new deviceInfo feild for discovered AMT flag Jun 5, 2026
@ShradhaGupta31 ShradhaGupta31 force-pushed the add-device-api-new-parms branch from e6757a7 to f201405 Compare June 5, 2026 06:57
- 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>
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.

2 participants