test(scripts): route fixture config helper · openclaw/openclaw@3f59761
vincentkoc
·
2026-06-21
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1554,6 +1554,7 @@ const TOOLING_SOURCE_TEST_TARGETS = new Map([
|
1554 | 1554 | "scripts/e2e/lib/fixture.mjs", |
1555 | 1555 | ["test/scripts/fixture-config.test.ts", "test/scripts/fixtures-workspace.test.ts"], |
1556 | 1556 | ], |
| 1557 | +["scripts/e2e/lib/fixtures/config.mjs", ["test/scripts/fixture-config.test.ts"]], |
1557 | 1558 | [ |
1558 | 1559 | "scripts/e2e/lib/kitchen-sink-plugin/sweep.sh", |
1559 | 1560 | ["test/scripts/kitchen-sink-plugin-assertions.test.ts"], |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -126,4 +126,25 @@ describe("scripts/e2e/lib/fixture.mjs config commands", () => {
|
126 | 126 | rmSync(root, { recursive: true, force: true }); |
127 | 127 | } |
128 | 128 | }); |
| 129 | + |
| 130 | +it("writes OpenAI web-search minimal config for the package scenario", () => { |
| 131 | +const root = makeTempRoot(); |
| 132 | +try { |
| 133 | +const result = runFixture(root, "openai-web-search-minimal-config"); |
| 134 | + |
| 135 | +expect(result.status).toBe(0); |
| 136 | +const config = JSON.parse(readFileSync(path.join(root, "openclaw.json"), "utf8")); |
| 137 | +expect(config.agents.defaults.model.primary).toBe("openai/gpt-5"); |
| 138 | +expect(config.models.providers.openai).toMatchObject({ |
| 139 | +api: "openai-responses", |
| 140 | +baseUrl: "http://api.openai.com/v1", |
| 141 | +request: { allowPrivateNetwork: true }, |
| 142 | +}); |
| 143 | +expect(config.tools.web.search).toEqual({ enabled: true, maxResults: 3 }); |
| 144 | +expect(config.plugins.entries.openai).toEqual({ enabled: true }); |
| 145 | +expect(config.gateway.auth).toEqual({ mode: "token", token: "test-token" }); |
| 146 | +} finally { |
| 147 | +rmSync(root, { recursive: true, force: true }); |
| 148 | +} |
| 149 | +}); |
129 | 150 | }); |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -495,6 +495,7 @@ describe("scripts/test-projects changed-target routing", () => {
|
495 | 495 | "scripts/e2e/lib/fixture.mjs", |
496 | 496 | ["test/scripts/fixture-config.test.ts", "test/scripts/fixtures-workspace.test.ts"], |
497 | 497 | ], |
| 498 | +["scripts/e2e/lib/fixtures/config.mjs", ["test/scripts/fixture-config.test.ts"]], |
498 | 499 | [ |
499 | 500 | "scripts/e2e/lib/kitchen-sink-plugin/sweep.sh", |
500 | 501 | ["test/scripts/kitchen-sink-plugin-assertions.test.ts"], |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。