Add YAML and param-file golden tests#55
Conversation
Cover --param-file parsing with embedded fixtures, synthetic ResultSet YAML goldens, and full PROFILE JSON snapshots with jq filter variants. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Code Review
This pull request introduces comprehensive golden file testing for YAML output and Spanner profile JSON-to-YAML conversions, alongside refactoring parameter loading tests to use external YAML fixtures. Feedback on the changes highlights two important improvements: first, ensuring that the encoder in yaml_golden_test.go is properly closed if it implements a Close method to guarantee all buffered data is flushed; second, rebinding the loop variable tc in params/fixtures_test.go to prevent variable capture issues when running subtests in parallel.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Co-authored-by: Cursor <cursoragent@cursor.com>
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces comprehensive YAML golden tests and parameter file loading tests. It refactors existing tests in params/load_test.go by moving inline YAML definitions into dedicated fixture files under params/testdata/. Additionally, it adds new test suites in profile_yaml_test.go and yaml_golden_test.go to verify the conversion of Spanner profile JSONs and result sets into YAML format against golden files. Feedback on the changes suggests pinning loop variables inside the test loops in profile_yaml_test.go and yaml_golden_test.go to prevent potential concurrency bugs and ensure consistency across the test suite.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
--format=yamloutput viaencodeResultSetYAML(jq +newEncoder).--param-filefixtures and consolidateLoadParamFiletests.ResultSetJSON snapshots with multiple jq filter goldens.-update-goldento cover YAML output goldens.Test plan
go test ./...Made with Cursor