pkg/bindings: Add tests for ToParams and helpers #28931
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.33) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.33 · 151 lines diff across 1 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.301
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #28931"
general
weight: 0.35
ROKUMATE
Fixes: #28930
<!--
Thanks for sending a pull request!
For more detailed information, please review our contributing guidelines:
https://github.com/containers/podman/blob/main/CONTRIBUTING.md#submitting-pull-requests
-->
What
Add unit tests for
pkg/bindings/internal/util:ToParams,Changed,IsSimpleType, andSimpleTypeToParam. These had no test coverage.Why
ToParamsbuilds the URL query parameters for every binding call, so itsbehavior matters broadly and is easy to regress: only non-nil fields are
emitted, the
schematag renames a param (and-omits it), simple types andfmt.Stringerbecome a single value, slices become repeated values, and mapsare serialized to JSON. The tests lock this in.
Details
Table-driven tests in
pkg/bindings/internal/util/util_test.gocovering:non-simple types
maps (JSON), schema-tag rename and "-" omission, and the slice-of-non-simple
error path
No production code changes.
go test ./pkg/bindings/internal/util/passes.