Skip to content

Commit 8aa82f4

Browse files
fix(go): add permission handler to abort test and regenerate snapshot
The abort test creates a session with nil config and waits for tool.execution_start. After the default-deny fix (requestPermission=true always sent), tool calls are denied before execution, so the event never fires and the test times out. Add OnPermissionRequest: PermissionHandler.ApproveAll so the shell tool can start executing, then be interrupted by the abort. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 63852b5 commit 8aa82f4

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

go/internal/e2e/session_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,9 @@ func TestSession(t *testing.T) {
463463
t.Run("should abort a session", func(t *testing.T) {
464464
ctx.ConfigureForTest(t)
465465

466-
session, err := client.CreateSession(t.Context(), nil)
466+
session, err := client.CreateSession(t.Context(), &copilot.SessionConfig{
467+
OnPermissionRequest: copilot.PermissionHandler.ApproveAll,
468+
})
467469
if err != nil {
468470
t.Fatalf("Failed to create session: %v", err)
469471
}

0 commit comments

Comments
 (0)