(t *testing.T)
| 528 | } |
| 529 | |
| 530 | func TestClaudeEngineAddsTmpByDefault(t *testing.T) { |
| 531 | engine := NewClaudeEngine() |
| 532 | cacheMemoryConfig, err := NewCompiler().extractCacheMemoryConfigFromMap(map[string]any{}) |
| 533 | if err != nil { |
| 534 | t.Fatalf("extract cache-memory config: %v", err) |
| 535 | } |
| 536 | |
| 537 | sandboxConfig := &SandboxConfig{ |
| 538 | Agent: &AgentSandboxConfig{ |
| 539 | Type: SandboxTypeAWF, |
| 540 | }, |
| 541 | } |
| 542 | |
| 543 | got := engine.computeAllowedClaudeToolsString(map[string]any{}, nil, cacheMemoryConfig, nil, sandboxConfig) |
| 544 | want := "Edit(/tmp/*),ExitPlanMode,Glob,Grep,LS,MultiEdit(/tmp/*),NotebookRead,Read,Read(/tmp/*),Task,TodoWrite,Write(/tmp/*)" |
| 545 | if got != want { |
| 546 | t.Fatalf("unexpected allowed tools\nwant: %s\ngot: %s", want, got) |
| 547 | } |
| 548 | } |
| 549 | |
| 550 | func TestGenerateAllowedToolsComment(t *testing.T) { |
| 551 | engine := NewClaudeEngine() |
nothing calls this directly
no test coverage detected