mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 08:50:21 +00:00
perf(test): consolidate daemon test entrypoints
This commit is contained in:
@@ -1,37 +0,0 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { parseSystemdExecStart } from "./systemd-unit.js";
|
||||
|
||||
describe("parseSystemdExecStart", () => {
|
||||
it("splits on whitespace outside quotes", () => {
|
||||
const execStart = "/usr/bin/openclaw gateway start --foo bar";
|
||||
expect(parseSystemdExecStart(execStart)).toEqual([
|
||||
"/usr/bin/openclaw",
|
||||
"gateway",
|
||||
"start",
|
||||
"--foo",
|
||||
"bar",
|
||||
]);
|
||||
});
|
||||
|
||||
it("preserves quoted arguments", () => {
|
||||
const execStart = '/usr/bin/openclaw gateway start --name "My Bot"';
|
||||
expect(parseSystemdExecStart(execStart)).toEqual([
|
||||
"/usr/bin/openclaw",
|
||||
"gateway",
|
||||
"start",
|
||||
"--name",
|
||||
"My Bot",
|
||||
]);
|
||||
});
|
||||
|
||||
it("parses path arguments", () => {
|
||||
const execStart = "/usr/bin/openclaw gateway start --path /tmp/openclaw";
|
||||
expect(parseSystemdExecStart(execStart)).toEqual([
|
||||
"/usr/bin/openclaw",
|
||||
"gateway",
|
||||
"start",
|
||||
"--path",
|
||||
"/tmp/openclaw",
|
||||
]);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user