mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-08 00:16:24 +00:00
test(release): narrow Parallels agent smoke plugins
This commit is contained in:
@@ -238,7 +238,11 @@ API_KEY_VALUE="${!API_KEY_ENV:-}"
|
||||
[[ -n "$API_KEY_VALUE" ]] || die "$API_KEY_ENV is required"
|
||||
|
||||
release_smoke_plugin_allowlist_json() {
|
||||
printf '["%s","acpx","bonjour","browser","device-pair","phone-control","talk-voice"]' "$PROVIDER"
|
||||
if [[ -n "${OPENCLAW_PARALLELS_RELEASE_SMOKE_PLUGIN_ALLOWLIST_JSON:-}" ]]; then
|
||||
printf '%s' "$OPENCLAW_PARALLELS_RELEASE_SMOKE_PLUGIN_ALLOWLIST_JSON"
|
||||
return
|
||||
fi
|
||||
printf '["%s"]' "$PROVIDER"
|
||||
}
|
||||
|
||||
RELEASE_SMOKE_PLUGIN_ALLOWLIST_JSON="$(release_smoke_plugin_allowlist_json)"
|
||||
|
||||
@@ -281,7 +281,11 @@ API_KEY_VALUE="${!API_KEY_ENV:-}"
|
||||
[[ -n "$API_KEY_VALUE" ]] || die "$API_KEY_ENV is required"
|
||||
|
||||
release_smoke_plugin_allowlist_json() {
|
||||
printf '["%s","acpx","bonjour","browser","device-pair","phone-control","talk-voice"]' "$PROVIDER"
|
||||
if [[ -n "${OPENCLAW_PARALLELS_RELEASE_SMOKE_PLUGIN_ALLOWLIST_JSON:-}" ]]; then
|
||||
printf '%s' "$OPENCLAW_PARALLELS_RELEASE_SMOKE_PLUGIN_ALLOWLIST_JSON"
|
||||
return
|
||||
fi
|
||||
printf '["%s"]' "$PROVIDER"
|
||||
}
|
||||
|
||||
ps_single_quote() {
|
||||
|
||||
@@ -33,8 +33,8 @@ describe("Parallels smoke model selection", () => {
|
||||
}
|
||||
});
|
||||
|
||||
it("keeps Parallels agent-turn smokes on a focused plugin allowlist", () => {
|
||||
for (const scriptPath of [...OS_SCRIPT_PATHS, NPM_UPDATE_SCRIPT_PATH]) {
|
||||
it("keeps Parallels agent-turn smokes on a provider-only plugin allowlist by default", () => {
|
||||
for (const scriptPath of ["scripts/e2e/parallels-windows-smoke.sh", NPM_UPDATE_SCRIPT_PATH]) {
|
||||
const script = readFileSync(scriptPath, "utf8");
|
||||
|
||||
expect(script, scriptPath).toContain("release_smoke_plugin_allowlist_json");
|
||||
@@ -43,8 +43,12 @@ describe("Parallels smoke model selection", () => {
|
||||
script.includes("config set plugins.allow") || script.includes("config set --batch-file"),
|
||||
scriptPath,
|
||||
).toBe(true);
|
||||
expect(script, scriptPath).toContain('"acpx"');
|
||||
expect(script, scriptPath).toContain('"device-pair"');
|
||||
expect(script, scriptPath).toContain('printf \'["%s"]\' "$PROVIDER"');
|
||||
expect(script, scriptPath).toContain(
|
||||
"OPENCLAW_PARALLELS_RELEASE_SMOKE_PLUGIN_ALLOWLIST_JSON",
|
||||
);
|
||||
expect(script, scriptPath).not.toContain('"acpx"');
|
||||
expect(script, scriptPath).not.toContain('"device-pair"');
|
||||
expect(script, scriptPath).not.toContain('"memory-core"');
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user