docs: annotate Foundry source and deployment lifecycle in Chinese [skip ci]
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// 可选端到端回归:在获授权远程环境使用真实 Endoleap Node runtime 对接 Foundry HTTP 和隔离数据库。
|
||||
package platform
|
||||
|
||||
import (
|
||||
@@ -19,6 +20,7 @@ import (
|
||||
|
||||
// Runs the real Endoleap runtime against authenticated Foundry HTTP and PostgreSQL.
|
||||
// This opt-in is enabled by the existing remote schema runner, never local builds.
|
||||
// TestHeadlessClientHTTPIntegration 需 FOUNDRY_HEADLESS_SOURCE 指向客户端源码;缺省跳过,显式开启却无隔离数据库则失败。
|
||||
func TestHeadlessClientHTTPIntegration(t *testing.T) {
|
||||
source, dsn := os.Getenv("FOUNDRY_HEADLESS_SOURCE"), os.Getenv("PLATFORM_TEST_DATABASE_URL")
|
||||
if source == "" {
|
||||
@@ -66,6 +68,7 @@ func TestHeadlessClientHTTPIntegration(t *testing.T) {
|
||||
|
||||
server := httptest.NewServer(mux)
|
||||
defer server.Close()
|
||||
// 子进程最多两分钟,环境传递临时项目/账户/会话;所有输出先替换 token 再报告。
|
||||
commandContext, cancel := context.WithTimeout(ctx, 2*time.Minute)
|
||||
defer cancel()
|
||||
command := exec.CommandContext(commandContext, "node", filepath.Join(source, "tests/headless/foundry.integration.mjs"))
|
||||
@@ -76,6 +79,7 @@ func TestHeadlessClientHTTPIntegration(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("headless HTTP client failed: %v\n%s", err, report)
|
||||
}
|
||||
// 仅退出零不够,报告必须声明 status ok 且 runtimeAI 实际执行过。
|
||||
if !strings.Contains(report, `"status":"ok"`) || !strings.Contains(report, `"runtimeAI":true`) {
|
||||
t.Fatalf("headless HTTP client did not return success: %s", report)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user