Skip to content

Commit 2a2b45c

Browse files
Add sessionId to Rust hook test fixtures
The session_test hooks tests were missing the sessionId field in their input JSON, causing deserialization failures after adding the required session_id field to hook input structs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 582c506 commit 2a2b45c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

rust/tests/session_test.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2245,6 +2245,7 @@ async fn hooks_invoke_dispatches_to_session_hooks() {
22452245
"sessionId": server.session_id,
22462246
"hookType": "preToolUse",
22472247
"input": {
2248+
"sessionId": "test-session",
22482249
"timestamp": 1234567890,
22492250
"cwd": "/tmp",
22502251
"toolName": "rm",
@@ -2282,6 +2283,7 @@ async fn hooks_invoke_returns_empty_for_unregistered_hook() {
22822283
"sessionId": server.session_id,
22832284
"hookType": "sessionEnd",
22842285
"input": {
2286+
"sessionId": "test-session",
22852287
"timestamp": 1234567890,
22862288
"cwd": "/tmp",
22872289
"reason": "complete"

0 commit comments

Comments
 (0)