File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,7 +94,9 @@ func TestClient(t *testing.T) {
9494 })
9595 t .Cleanup (func () { client .ForceStop () })
9696
97- _ , err := client .CreateSession (t .Context (), nil )
97+ _ , err := client .CreateSession (t .Context (), & copilot.SessionConfig {
98+ OnPermissionRequest : copilot .PermissionHandler .ApproveAll ,
99+ })
98100 if err != nil {
99101 t .Fatalf ("Failed to create session: %v" , err )
100102 }
@@ -118,7 +120,9 @@ func TestClient(t *testing.T) {
118120 })
119121 t .Cleanup (func () { client .ForceStop () })
120122
121- _ , err := client .CreateSession (t .Context (), nil )
123+ _ , err := client .CreateSession (t .Context (), & copilot.SessionConfig {
124+ OnPermissionRequest : copilot .PermissionHandler .ApproveAll ,
125+ })
122126 if err != nil {
123127 t .Fatalf ("Failed to create session: %v" , err )
124128 }
Original file line number Diff line number Diff line change @@ -206,7 +206,9 @@ async def test_should_report_error_with_stderr_when_cli_fails_to_start(self):
206206
207207 # Verify subsequent calls also fail (don't hang)
208208 with pytest .raises (Exception ) as exc_info2 :
209- session = await client .create_session ()
209+ session = await client .create_session (
210+ {"on_permission_request" : PermissionHandler .approve_all }
211+ )
210212 await session .send ("test" )
211213 # Error message varies by platform (EINVAL on Windows, EPIPE on Linux)
212214 error_msg = str (exc_info2 .value ).lower ()
You can’t perform that action at this time.
0 commit comments