test(e2e): add Kagent lifecycle scenarios - #665
Conversation
Splits the Kagent suite into test/e2e/kagent with feature-per-file tests and moves the shared registry setup into an importable StartRegistry helper. Port-forwards default to an ephemeral local port so test packages can run concurrently.
There was a problem hiding this comment.
Pull request overview
Adds Kind-based end-to-end coverage for the Kagent runtime adapter by introducing a shared E2E registry bootstrap helper, new Kagent lifecycle scenario tests, and generated runnable scenario documentation under test/e2e/kagent/scenarios/.
Changes:
- Introduces
test/e2e/setup.goto centralize E2E prerequisites, arctl binary resolution, and registry URL resolution (including port-forward support). - Adds Kagent E2E test suite covering Agent lifecycle, MCPServer lifecycle (remote + source-backed), combined Agent+MCP scenario, and discovery of out-of-band Kagent Agents.
- Writes/commits generated scenario documentation markdown reflecting successful E2E runs.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/e2e/setup.go | New shared E2E bootstrap: prerequisites, arctl path setup, registry URL resolution/port-forwarding |
| test/e2e/e2e_test.go | Refactors E2E TestMain to use the shared StartRegistry helper |
| test/e2e/private_git_sources_test.go | Switches kubectl context usage to the exported KubeContext |
| test/e2e/kagent/mcp_test.go | Adds MCP lifecycle E2E coverage (remote + source-backed), plus tool discovery assertions |
| test/e2e/kagent/main_test.go | Adds Kagent suite TestMain to bootstrap registry access for Kagent E2E tests |
| test/e2e/kagent/helpers_test.go | Provides Kagent E2E helpers: manifest builders, kubectl interactions, polling/assertions, cleanup |
| test/e2e/kagent/docs_test.go | Adds doc recorder used to generate runnable scenario markdown from successful E2E runs |
| test/e2e/kagent/discovery_test.go | Adds out-of-band Kagent Agent discovery/removal E2E scenario |
| test/e2e/kagent/agent_test.go | Adds Agent deployment/reapply/removal E2E scenario with basic workload env assertions |
| test/e2e/kagent/agent_mcp_test.go | Adds combined Agent+MCP lifecycle scenario and asserts MCP config injection |
| test/e2e/kagent/scenarios/mcp.md | Generated runnable documentation for the MCP scenario |
| test/e2e/kagent/scenarios/discovery.md | Generated runnable documentation for the discovery scenario |
| test/e2e/kagent/scenarios/agent.md | Generated runnable documentation for the Agent scenario |
| test/e2e/kagent/scenarios/agent-mcp.md | Generated runnable documentation for the Agent+MCP scenario |
Files not reviewed (1)
- test/e2e/kagent/docs_test.go: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
timflannagan
left a comment
There was a problem hiding this comment.
While we're here, can we audit 1. the current state of e2e testing, and 2. whether we're missing some Make target machinery here. Just want to get things right. We talked in slack earlier today, we can figure out the right test/e2e/ organization later
Description
Adds Kind-based E2E coverage for the Kagent runtime adapter.
This PR is stacked on the Kagent runtime adapter branch and should target
xytian315/oss-kagent. Retarget it tomainafter the adapter PR merges.Change Type
/kind documentation
Changelog
Additional Notes
make test-e2e E2E_SUITE=kagent