feat: US-013 - Add FilesystemTool tests
Added comprehensive test coverage for FilesystemTool (ReadFileTool, WriteFileTool, ListDirTool) with 10 test cases: - TestFilesystemTool_ReadFile_Success: Verifies file content goes to ForLLM - TestFilesystemTool_ReadFile_NotFound: Verifies error handling for missing files - TestFilesystemTool_ReadFile_MissingPath: Verifies missing parameter handling - TestFilesystemTool_WriteFile_Success: Verifies SilentResult behavior - TestFilesystemTool_WriteFile_CreateDir: Verifies automatic directory creation - TestFilesystemTool_WriteFile_MissingPath: Verifies missing path parameter handling - TestFilesystemTool_WriteFile_MissingContent: Verifies missing content parameter handling - TestFilesystemTool_ListDir_Success: Verifies directory listing functionality - TestFilesystemTool_ListDir_NotFound: Verifies error handling for invalid paths - TestFilesystemTool_ListDir_DefaultPath: Verifies default to current directory FilesystemTool implementation already conforms to ToolResult specification: - ReadFile/ListDir return NewToolResult (ForLLM only, ForUser empty) - WriteFile returns SilentResult (Silent=true, ForUser empty) - Errors return ErrorResult with IsError=true Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -197,7 +197,7 @@
|
||||
"go test ./pkg/tools -run TestFilesystemTool passes"
|
||||
],
|
||||
"priority": 13,
|
||||
"passes": false,
|
||||
"passes": true,
|
||||
"notes": ""
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user