mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-22 11:38:12 +00:00
fix(testing): use UUIDs for Parallels background scripts
This commit is contained in:
@@ -70,7 +70,7 @@ export async function runWindowsBackgroundPowerShell(
|
||||
const pollIntervalMs = Math.max(1, Math.floor(options.pollIntervalMs ?? 5_000));
|
||||
const runCommand = options.runCommand ?? run;
|
||||
const safeLabel = options.label.replaceAll(/[^A-Za-z0-9_-]/g, "-");
|
||||
const nonce = `${safeLabel}-${Date.now()}-${Math.floor(Math.random() * 100000)}`;
|
||||
const nonce = `${safeLabel}-${randomUUID()}`;
|
||||
const fileBase = `openclaw-parallels-${nonce}`;
|
||||
const pathsScript = `$base = Join-Path $env:TEMP ${psSingleQuote(fileBase)}
|
||||
$scriptPath = "$base.ps1"
|
||||
|
||||
@@ -1045,6 +1045,7 @@ if (isPrlctl) {
|
||||
expect(guestTransports).toContain("guestScriptName");
|
||||
expect(guestTransports).not.toContain("Date.now()}.sh");
|
||||
expect(guestTransports).not.toContain("Date.now()}.ps1");
|
||||
expect(guestTransports).not.toContain("Math.random()");
|
||||
});
|
||||
|
||||
it("hardens restored macOS install lanes", () => {
|
||||
|
||||
Reference in New Issue
Block a user