Skip to content

fix: update test snapshots for yaml.v4 word-wrapping behavior - #6

Open
siretart wants to merge 1 commit into
pb33f:mainfrom
siretart:fix-yaml-upgrade
Open

fix: update test snapshots for yaml.v4 word-wrapping behavior#6
siretart wants to merge 1 commit into
pb33f:mainfrom
siretart:fix-yaml-upgrade

Conversation

@siretart

Copy link
Copy Markdown

fix: update test snapshots for yaml.v4 word-wrapping behavior

Newer versions of go.yaml.in/yaml/v4 introduce changes to how yaml.Node
structures are serialized to text. Specifically, long string fields
(like description fields in OpenAPI specs) are now automatically
word-wrapped at 80 columns.

The tests in pkg/overlay assert equality by comparing serialized YAML
nodes against hardcoded snapshot files (openapi-overlayed.yaml and
overlay-generated.yaml). Because the previous snapshots contained
unwrapped long lines, these tests failed when building with the
upgraded YAML parser.

This commit updates the yaml.v4 dependency to v4.0.0-rc.5 and
regenerates the test snapshots so they match the newly expected
word-wrapped format, preventing CI failures in environments using
newer dependencies.

Signed-off-by: Reinhard Tartler siretart@tauware.de

Newer versions of go.yaml.in/yaml/v4 introduce changes to how yaml.Node
structures are serialized to text. Specifically, long string fields
(like description fields in OpenAPI specs) are now automatically
word-wrapped at 80 columns.

The tests in pkg/overlay assert equality by comparing serialized YAML
nodes against hardcoded snapshot files (openapi-overlayed.yaml and
overlay-generated.yaml). Because the previous snapshots contained
unwrapped long lines, these tests failed when building with the
upgraded YAML parser.

This commit updates the yaml.v4 dependency to v4.0.0-rc.5 and
regenerates the test snapshots so they match the newly expected
word-wrapped format, preventing CI failures in environments using
newer dependencies.

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
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.

1 participant