mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-04 16:20:21 +00:00
Gateway: treat scope-limited probe RPC as degraded reachability (#45622)
* Gateway: treat scope-limited probe RPC as degraded * Docs: clarify gateway probe degraded scope output * test: fix CI type regressions in gateway and outbound suites * Tests: fix Node24 diffs theme loading and Windows assertions * Tests: fix extension typing after main rebase * Tests: fix Windows CI regressions after rebase * Tests: normalize executable path assertions on Windows * Tests: remove duplicate gateway daemon result alias * Tests: stabilize Windows approval path assertions * Tests: fix Discord rate-limit startup fixture typing * Tests: use Windows-friendly relative exec fixtures --------- Co-authored-by: Mainframe <mainframe@MainfraacStudio.localdomain>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import path from "node:path";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { matchesExecAllowlistPattern } from "./exec-allowlist-pattern.js";
|
||||
|
||||
@@ -28,9 +29,11 @@ describe("matchesExecAllowlistPattern", () => {
|
||||
const prevHome = process.env.HOME;
|
||||
process.env.OPENCLAW_HOME = "/srv/openclaw-home";
|
||||
process.env.HOME = "/home/other";
|
||||
const openClawHome = path.join(path.resolve("/srv/openclaw-home"), "bin", "tool");
|
||||
const fallbackHome = path.join(path.resolve("/home/other"), "bin", "tool");
|
||||
try {
|
||||
expect(matchesExecAllowlistPattern("~/bin/tool", "/srv/openclaw-home/bin/tool")).toBe(true);
|
||||
expect(matchesExecAllowlistPattern("~/bin/tool", "/home/other/bin/tool")).toBe(false);
|
||||
expect(matchesExecAllowlistPattern("~/bin/tool", openClawHome)).toBe(true);
|
||||
expect(matchesExecAllowlistPattern("~/bin/tool", fallbackHome)).toBe(false);
|
||||
} finally {
|
||||
if (prevOpenClawHome === undefined) {
|
||||
delete process.env.OPENCLAW_HOME;
|
||||
|
||||
Reference in New Issue
Block a user