MCPcopy Create free account
hub / github.com/github/gh-aw / TestClaudeEngineAddsTmpByDefault

Function TestClaudeEngineAddsTmpByDefault

pkg/workflow/claude_engine_tools_test.go:530–548  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

528}
529
530func 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
550func TestGenerateAllowedToolsComment(t *testing.T) {
551 engine := NewClaudeEngine()

Callers

nothing calls this directly

Calls 4

NewClaudeEngineFunction · 0.85
NewCompilerFunction · 0.85

Tested by

no test coverage detected