Skip to content

test(adkrest/models): add EventActions field mapping coverage#726

Open
nuthalapativarun wants to merge 4 commits intogoogle:mainfrom
nuthalapativarun:test/509-event-actions-field-mapping
Open

test(adkrest/models): add EventActions field mapping coverage#726
nuthalapativarun wants to merge 4 commits intogoogle:mainfrom
nuthalapativarun:test/509-event-actions-field-mapping

Conversation

@nuthalapativarun
Copy link
Copy Markdown

Description of Change

Problem:
FromSessionEvent and ToSessionEvent were missing TransferToAgent, Escalate, and SkipSummarization fields in the REST API EventActions struct (issue #509). The fix was merged in #609, but there were no tests to prevent regressions.

Solution:
Add table-driven tests covering all three fields for both FromSessionEvent and ToSessionEvent, plus a round-trip test (FromSessionEventToSessionEvent) to verify no EventActions fields are lost.

Closes #509

Testing Plan

Unit Tests:

  • Added TestFromSessionEvent_EventActions — 5 table cases (all fields, each field individually, zero value)
  • Added TestToSessionEvent_EventActions — same 5 cases for reverse direction
  • Added TestFromSessionEvent_RoundTrip — full round-trip test
  • All unit tests pass locally
$ go test ./server/adkrest/internal/models/...
ok  	google.golang.org/adk/server/adkrest/internal/models	0.209s

Checklist

  • I have read the CONTRIBUTING.md document.
  • I have performed a self-review of my own code.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.

Additional context

This PR adds regression test coverage only — no production code changes. The underlying fix was already merged in #609.


Authored by Varun Nuthalapati using AI coding assistance (Claude)

Add table-driven tests for FromSessionEvent and ToSessionEvent to verify
that TransferToAgent, Escalate, and SkipSummarization are correctly mapped
in both directions. Includes a round-trip test.

Closes google#509
@nuthalapativarun
Copy link
Copy Markdown
Author

Hi, just checking in on this one — happy to make any adjustments if something needs to change. Let me know if there's anything blocking review. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] REST API EventActions doesn't include TransferToAgent, Escalate, SkipSummarization fields

1 participant