File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,10 @@ build-all-platforms: clean tidy format lint ## Build the project for all platfor
5858test : # # Run the tests
5959 go test -count=1 -v ./...
6060
61+ .PHONY : test-update-snapshots
62+ test-update-snapshots : # # Update test snapshots for toolset tests
63+ UPDATE_TOOLSETS_JSON=1 go test -count=1 -v ./pkg/mcp
64+
6165.PHONY : format
6266format : # # Format the code
6367 go fmt ./...
Original file line number Diff line number Diff line change @@ -203,6 +203,10 @@ func (s *ToolsetsSuite) InitMcpClient() {
203203 s .McpClient = test .NewMcpClient (s .T (), s .mcpServer .ServeHTTP ())
204204}
205205
206+ // assertJsonSnapshot compares actual data against a JSON snapshot file.
207+ // When the snapshot doesn't match, the test fails with instructions on how to update it.
208+ // Set UPDATE_TOOLSETS_JSON=1 environment variable to regenerate snapshot files.
209+ // Example: UPDATE_TOOLSETS_JSON=1 go test ./pkg/mcp -v
206210func (s * ToolsetsSuite ) assertJsonSnapshot (snapshotFile string , actual any ) {
207211 _ , file , _ , _ := runtime .Caller (1 )
208212 snapshotPath := filepath .Join (filepath .Dir (file ), "testdata" , snapshotFile )
You can’t perform that action at this time.
0 commit comments