mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
test(scripts): route fixture config helper
This commit is contained in:
@@ -1554,6 +1554,7 @@ const TOOLING_SOURCE_TEST_TARGETS = new Map([
|
||||
"scripts/e2e/lib/fixture.mjs",
|
||||
["test/scripts/fixture-config.test.ts", "test/scripts/fixtures-workspace.test.ts"],
|
||||
],
|
||||
["scripts/e2e/lib/fixtures/config.mjs", ["test/scripts/fixture-config.test.ts"]],
|
||||
[
|
||||
"scripts/e2e/lib/kitchen-sink-plugin/sweep.sh",
|
||||
["test/scripts/kitchen-sink-plugin-assertions.test.ts"],
|
||||
|
||||
@@ -126,4 +126,25 @@ describe("scripts/e2e/lib/fixture.mjs config commands", () => {
|
||||
rmSync(root, { recursive: true, force: true });
|
||||
}
|
||||
});
|
||||
|
||||
it("writes OpenAI web-search minimal config for the package scenario", () => {
|
||||
const root = makeTempRoot();
|
||||
try {
|
||||
const result = runFixture(root, "openai-web-search-minimal-config");
|
||||
|
||||
expect(result.status).toBe(0);
|
||||
const config = JSON.parse(readFileSync(path.join(root, "openclaw.json"), "utf8"));
|
||||
expect(config.agents.defaults.model.primary).toBe("openai/gpt-5");
|
||||
expect(config.models.providers.openai).toMatchObject({
|
||||
api: "openai-responses",
|
||||
baseUrl: "http://api.openai.com/v1",
|
||||
request: { allowPrivateNetwork: true },
|
||||
});
|
||||
expect(config.tools.web.search).toEqual({ enabled: true, maxResults: 3 });
|
||||
expect(config.plugins.entries.openai).toEqual({ enabled: true });
|
||||
expect(config.gateway.auth).toEqual({ mode: "token", token: "test-token" });
|
||||
} finally {
|
||||
rmSync(root, { recursive: true, force: true });
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -495,6 +495,7 @@ describe("scripts/test-projects changed-target routing", () => {
|
||||
"scripts/e2e/lib/fixture.mjs",
|
||||
["test/scripts/fixture-config.test.ts", "test/scripts/fixtures-workspace.test.ts"],
|
||||
],
|
||||
["scripts/e2e/lib/fixtures/config.mjs", ["test/scripts/fixture-config.test.ts"]],
|
||||
[
|
||||
"scripts/e2e/lib/kitchen-sink-plugin/sweep.sh",
|
||||
["test/scripts/kitchen-sink-plugin-assertions.test.ts"],
|
||||
|
||||
Reference in New Issue
Block a user