(t *testing.T)
| 526 | } |
| 527 | |
| 528 | func TestExecuteOnUserInput(t *testing.T) { |
| 529 | t.Parallel() |
| 530 | |
| 531 | config := &Config{ |
| 532 | OnUserInput: []Hook{ |
| 533 | {Type: HookTypeCommand, Command: "echo 'user input needed'", Timeout: 5}, |
| 534 | }, |
| 535 | } |
| 536 | |
| 537 | exec := NewExecutor(config, t.TempDir(), nil) |
| 538 | input := &Input{ |
| 539 | SessionID: "test-session", |
| 540 | } |
| 541 | |
| 542 | result, err := exec.Dispatch(t.Context(), EventOnUserInput, input) |
| 543 | require.NoError(t, err) |
| 544 | assert.True(t, result.Allowed) |
| 545 | } |
| 546 | |
| 547 | func TestExecuteStop(t *testing.T) { |
| 548 | t.Parallel() |
nothing calls this directly
no test coverage detected