test(agent-platform): add ui.go coverage for SPA serving and env config#1135
Open
test(agent-platform): add ui.go coverage for SPA serving and env config#1135
Conversation
ui.go was introduced in 96f598f (serve orchestrator UI from container layer) with no corresponding test file. Add ui_test.go covering: - getUIDir: default /opt/ui fallback and UI_DIR env-var override - registerUI: root path serves index.html - registerUI: existing static assets are served directly - registerUI: unknown routes fall back to index.html (SPA behaviour) - registerUI: nested unknown routes also fall back to index.html Update BUILD to include ui_test.go in both orchestrator_unit_test and orchestrator_test targets. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ui.gowas introduced in96f598f7(serve orchestrator UI from container layer) with no corresponding test file9321065..b6ab9ae: the only Go/Python file changed wassandbox_test.go(already a test);model.gois handled by PR test(agent-orchestrator): add model type tests after recipe-path refactor #1129ui_test.gocovering the two functions inui.go:getUIDir: default/opt/uifallback whenUI_DIRunset; readsUI_DIRenv var when setregisterUI: root/path servesindex.html; existing static assets served directly; unknown routes fall back toindex.html(SPA behaviour); nested unknown routes also fall backTest plan
bb test //projects/agent_platform/orchestrator:orchestrator_unit_testpasses (6 new tests, 0.0s)bazel test //...passes🤖 Generated with Claude Code