Skip to content

Conversation

rsdmike
Copy link
Member

@rsdmike rsdmike commented Sep 3, 2025

Include changes from #566 , thank you @KalleDK. Fixes #565

@Copilot Copilot AI review requested due to automatic review settings September 3, 2025 21:40
Copy link

@Copilot 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

This PR updates unit tests to accommodate changes in XML unmarshalling behavior related to whitespace handling in character data (chardata). The changes ensure test data matches the new behavior where insignificant whitespace is properly trimmed during XML processing.

  • Adds a custom UnmarshalXML method to SelectorResponse to trim whitespace from text content
  • Updates XML test files and Go test expectations to reflect the normalized whitespace behavior
  • Modifies test assertions to expect trimmed string values instead of whitespace-containing values

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pkg/wsman/amt/tls/types.go Adds UnmarshalXML method to trim whitespace in SelectorResponse text
pkg/wsman/amt/tls/credentialcontext_test.go Updates test expectations and XML response data to match trimmed values
pkg/wsman/ips/http/service_test.go Updates ResourceURI test expectation to remove newlines and whitespace
pkg/wsman/wsmantesting/responses/... Updates XML test files to normalize whitespace formatting
pkg/wsman/amt/tls/credentialcontext.go Minor formatting change

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@rsdmike rsdmike changed the title tests: update unit tests for ,chardata XML unmarshalling change test: update unit tests for ,chardata XML unmarshalling change Sep 3, 2025
@rsdmike rsdmike force-pushed the testsUpdate branch 2 times, most recently from b6607af to 6d51303 Compare September 3, 2025 21:48
@rsdmike rsdmike changed the title test: update unit tests for ,chardata XML unmarshalling change fix: update unit tests for ,chardata XML unmarshalling change Sep 3, 2025
@rsdmike rsdmike changed the title fix: update unit tests for ,chardata XML unmarshalling change fix: unmarshalling SelectorResponse now includes Text data Sep 3, 2025
@rsdmike rsdmike merged commit 0293528 into main Sep 3, 2025
21 checks passed
@rsdmike rsdmike deleted the testsUpdate branch September 3, 2025 23:15
@RosieAMT
Copy link

RosieAMT commented Sep 3, 2025

🎉 This PR is included in version 2.30.5 🎉

The release is available on GitHub release

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.

Invalid XML parse data
3 participants