Update test timeout and modify prompt structure in E2E tests

- Increase the timeout for the unit-test-registry target in the Makefile to 5 minutes for improved test execution.
- Refactor the prompt structure in E2E tests to align with the new format, enhancing clarity and consistency in the test setup.
This commit is contained in:
Max 2026-03-03 08:57:08 +08:00
parent 634bc1d093
commit 38abd0e95b
2 changed files with 3 additions and 3 deletions

View file

@ -178,7 +178,7 @@ unit-test-robot:
.PHONY: unit-test-registry
unit-test-registry:
echo "mode: count" > coverage.out
$(GO) test -v -timeout=2m -covermode=count -coverprofile=profile.out ./registry/... > tmp.out; \
$(GO) test -v -p 1 -timeout=5m -covermode=count -coverprofile=profile.out ./registry/... > tmp.out; \
cat tmp.out; \
if grep -q "^--- FAIL" tmp.out; then \
rm tmp.out; \

View file

@ -189,7 +189,7 @@ func buildV2AgentApp(t *testing.T) string {
"mentionable": false
}`)
mustWriteFile(t, filepath.Join(assistDir, "prompts.yml"),
"system: |\n You are the v2 registry test assistant with enhanced capabilities.\n")
"- role: system\n content: |\n You are the v2 registry test assistant with enhanced capabilities.\n")
mustWriteFile(t, filepath.Join(assistDir, "tools.ts"),
`export function newV2Tool(): number { return 42; }`)
@ -321,7 +321,7 @@ func buildV2AnalyticsApp(t *testing.T) string {
"mentionable": false
}`)
mustWriteFile(t, filepath.Join(assistDir, "prompts.yml"),
"system: |\n You are the v2 analytics assistant with charting capabilities.\n")
"- role: system\n content: |\n You are the v2 analytics assistant with charting capabilities.\n")
mustWriteFile(t, filepath.Join(assistDir, "chart_helper.ts"),
`export function renderChart(): string { return "chart-v2"; }`)