Skip to content

[AAASM-1678] ✅ (adapters/google_adk): Add Google ADK interception integration test#47

Merged
Chisanan232 merged 1 commit into
masterfrom
v0.0.1/AAASM-1678/test/google_adk_integration
May 21, 2026
Merged

[AAASM-1678] ✅ (adapters/google_adk): Add Google ADK interception integration test#47
Chisanan232 merged 1 commit into
masterfrom
v0.0.1/AAASM-1678/test/google_adk_integration

Conversation

@Chisanan232
Copy link
Copy Markdown
Contributor

Description

Adds an integration test exercising GoogleADKPatch against the google.adk.tools.BaseTool patch path. Two tests:

  1. Async two-tool flow under a monkeypatch-installed FakeBaseTool — verifies a denied tool raises PolicyViolationError("blocked by governance policy") while a sibling safe tool's patched run_async still executes and records its result.
  2. Real-BaseTool patch path — guarded by pytest.importorskip("google.adk.tools"). Asserts the patched flag is set after apply() and cleared after revert() against the live BaseTool class when google-adk is installed.

This is sub-task 2 of AAASM-1550. Stacked on top of #46 (AAASM-1677). Once #46 merges, this PR will show only the new test file in its diff.

Type of Change

  • ✨ New feature
  • 🔧 Bug fix
  • ♻️ Refactoring
  • 🍀 Performance improvement
  • 📚 Documentation update
  • 🚀 Release
  • ✅ Tests

Breaking Changes

  • No

Related Issues

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • No tests required

Local run:

```text
test/integration/test_google_adk_interception_integration.py
test_google_adk_two_tool_flow_continues_after_blocked_tool PASSED
test_google_adk_real_base_tool_class_patch_path_when_available SKIPPED (no google-adk locally)
```

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Comments added for complex logic
  • Documentation updated if needed
  • All tests passing

🤖 Generated with Claude Code

@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Two tests:

* A two-tool async flow under a `monkeypatch`ed `google.adk.tools.BaseTool`
  that verifies a denied tool raises `PolicyViolationError("blocked by
  governance policy")` while a subsequent safe tool still executes its
  patched `run_async` path through `record_result`.
* A real-`BaseTool` patch-path test guarded by `pytest.importorskip` that
  asserts the patched flag is set after `apply()` and cleared after
  `revert()` against the live `google.adk.tools.BaseTool` class.

Test marked `@pytest.mark.integration`; skips cleanly without `google-adk`.

Refs: AAASM-1678
@Chisanan232 Chisanan232 force-pushed the v0.0.1/AAASM-1678/test/google_adk_integration branch from 9cc0efb to c107b9d Compare May 21, 2026 01:41
@sonarqubecloud
Copy link
Copy Markdown

@Chisanan232 Chisanan232 merged commit de34f14 into master May 21, 2026
22 checks passed
@Chisanan232 Chisanan232 deleted the v0.0.1/AAASM-1678/test/google_adk_integration branch May 21, 2026 01:54
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.

1 participant