mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
Systemd: allowlist environment file fixtures
This commit is contained in:
@@ -496,10 +496,10 @@ describe("readSystemdServiceExecStart", () => {
|
||||
].join("\n");
|
||||
}
|
||||
if (pathValue === "/home/test/.openclaw/first.env") {
|
||||
return "OPENCLAW_GATEWAY_TOKEN=first-token\n";
|
||||
return "OPENCLAW_GATEWAY_TOKEN=first-token\n"; // pragma: allowlist secret
|
||||
}
|
||||
if (pathValue === "/home/test/.openclaw/second env.env") {
|
||||
return 'OPENCLAW_GATEWAY_PASSWORD="second password"\n';
|
||||
return 'OPENCLAW_GATEWAY_PASSWORD="second password"\n'; // pragma: allowlist secret
|
||||
}
|
||||
throw new Error(`unexpected readFile path: ${pathValue}`);
|
||||
});
|
||||
@@ -523,12 +523,12 @@ describe("readSystemdServiceExecStart", () => {
|
||||
}
|
||||
if (pathValue.endsWith("/.config/systemd/user/gateway.env")) {
|
||||
return [
|
||||
"OPENCLAW_GATEWAY_TOKEN=relative-token",
|
||||
"OPENCLAW_GATEWAY_PASSWORD=relative-password",
|
||||
"OPENCLAW_GATEWAY_TOKEN=relative-token", // pragma: allowlist secret
|
||||
"OPENCLAW_GATEWAY_PASSWORD=relative-password", // pragma: allowlist secret
|
||||
].join("\n");
|
||||
}
|
||||
if (pathValue.endsWith("/.config/systemd/user/override.env")) {
|
||||
return "OPENCLAW_GATEWAY_TOKEN=override-token\n";
|
||||
return "OPENCLAW_GATEWAY_TOKEN=override-token\n"; // pragma: allowlist secret
|
||||
}
|
||||
throw new Error(`unexpected readFile path: ${pathValue}`);
|
||||
});
|
||||
@@ -554,8 +554,8 @@ describe("readSystemdServiceExecStart", () => {
|
||||
return [
|
||||
"# comment",
|
||||
"; another comment",
|
||||
'OPENCLAW_GATEWAY_TOKEN="quoted token"',
|
||||
"OPENCLAW_GATEWAY_PASSWORD=quoted-password",
|
||||
'OPENCLAW_GATEWAY_TOKEN="quoted token"', // pragma: allowlist secret
|
||||
"OPENCLAW_GATEWAY_PASSWORD=quoted-password", // pragma: allowlist secret
|
||||
].join("\n");
|
||||
}
|
||||
throw new Error(`unexpected readFile path: ${pathValue}`);
|
||||
|
||||
Reference in New Issue
Block a user