fix(handlers-tests): align pinned activity_logs expectations with 13-arg LogActivity (message_id) #2576
@@ -702,6 +702,7 @@ func TestProxyA2A_CallerIDDerivedFromBearer(t *testing.T) {
|
||||
sqlmock.AnyArg(), // $10 duration_ms
|
||||
sqlmock.AnyArg(), // $11 status
|
||||
sqlmock.AnyArg(), // $12 error_detail
|
||||
sqlmock.AnyArg(), // $13 message_id (#2560 idempotent upsert)
|
||||
).
|
||||
WillReturnResult(sqlmock.NewResult(0, 1))
|
||||
|
||||
@@ -2055,6 +2056,7 @@ func TestHandleA2ADispatchError_BusyEnqueueLogsQueuedNotFailure(t *testing.T) {
|
||||
sqlmock.AnyArg(),
|
||||
"ok",
|
||||
nil,
|
||||
sqlmock.AnyArg(), // $13 message_id (#2560 idempotent upsert)
|
||||
).
|
||||
WillReturnResult(sqlmock.NewResult(0, 1))
|
||||
|
||||
|
||||
@@ -187,10 +187,12 @@ func expectUploadPollTxRollback(mock sqlmock.Sqlmock) {
|
||||
// fields so a refactor that flips activity_type back to a custom value is
|
||||
// caught here instead of at runtime by a confused poller.
|
||||
//
|
||||
// Positional args (LogActivity uses ExecContext with 12 positional params):
|
||||
// Positional args (LogActivity uses ExecContext with 13 positional params
|
||||
// since #2560 added message_id for idempotent upserts):
|
||||
// $1 workspace_id, $2 activity_type, $3 source_id, $4 target_id,
|
||||
// $5 method, $6 summary, $7 request_body, $8 response_body,
|
||||
// $9 tool_trace, $10 duration_ms, $11 status, $12 error_detail.
|
||||
// $9 tool_trace, $10 duration_ms, $11 status, $12 error_detail,
|
||||
// $13 message_id.
|
||||
func expectActivityInsertWithTypeAndMethod(mock sqlmock.Sqlmock, workspaceID, activityType, method string) {
|
||||
mock.ExpectExec(`INSERT INTO activity_logs`).
|
||||
WithArgs(
|
||||
@@ -206,6 +208,7 @@ func expectActivityInsertWithTypeAndMethod(mock sqlmock.Sqlmock, workspaceID, ac
|
||||
sqlmock.AnyArg(), // $10 duration_ms
|
||||
sqlmock.AnyArg(), // $11 status
|
||||
sqlmock.AnyArg(), // $12 error_detail
|
||||
sqlmock.AnyArg(), // $13 message_id
|
||||
).
|
||||
WillReturnResult(sqlmock.NewResult(1, 1))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user