Skip to content

refactor: adds dtos for hwinfo#833

Merged
rsdmike merged 2 commits intomainfrom
hwDtoFix
Mar 30, 2026
Merged

refactor: adds dtos for hwinfo#833
rsdmike merged 2 commits intomainfrom
hwDtoFix

Conversation

@rsdmike
Copy link
Copy Markdown
Member

@rsdmike rsdmike commented Mar 11, 2026

No description provided.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 11, 2026

Codecov Report

❌ Patch coverage is 80.95238% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 40.24%. Comparing base (9444473) to head (eb31d1a).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
internal/mocks/wsman_mocks.go 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #833      +/-   ##
==========================================
+ Coverage   40.13%   40.24%   +0.11%     
==========================================
  Files         114      114              
  Lines       10892    10868      -24     
==========================================
+ Hits         4371     4374       +3     
+ Misses       6119     6092      -27     
  Partials      402      402              

☔ View full report in Codecov by Sentry.
📢 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.

@rsdmike rsdmike marked this pull request as ready for review March 18, 2026 17:00
Copilot AI review requested due to automatic review settings March 18, 2026 17:00
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

Refactors the WSMAN hardware/disk info retrieval path to return typed result structs instead of interface{}/map-based payloads, and updates the devices usecase + tests/mocks accordingly.

Changes:

  • Updated WSMAN Management APIs to return HWResults / DiskResults structs and removed the old map-shaping helpers.
  • Updated devices usecase DTO conversion to consume typed WSMAN results directly.
  • Regenerated/updated mocks and adjusted unit tests to match the new return types.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
internal/usecase/devices/wsman/message_test.go Removes tests for the deleted physical-memory slice conversion helper.
internal/usecase/devices/wsman/message.go Changes GetHardwareInfo/GetDiskInfo to return typed results; removes map-conversion helpers.
internal/usecase/devices/wsman/interfaces.go Updates Management interface signatures to return typed results.
internal/usecase/devices/info.go Converts typed WSMAN results directly into v1 DTOs (no intermediate maps).
internal/usecase/devices/info_test.go Updates mocks/expectations and expected DTO shapes for HW/Disk info.
internal/mocks/wsman_mocks.go Updates generated gomock stubs for the new typed return values and generation command.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@rsdmike rsdmike enabled auto-merge (rebase) March 30, 2026 18:23
@rsdmike rsdmike merged commit 75d7f81 into main Mar 30, 2026
17 checks passed
@rsdmike rsdmike deleted the hwDtoFix branch March 30, 2026 18:29
@RosieAMT
Copy link
Copy Markdown

🎉 This PR is included in version 1.22.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants