mirror of
https://bitbucket.org/siakitem/my-pi.git
synced 2026-08-28 08:35:57 +00:00
feat: add pure ssh2 remote operations
This commit is contained in:
@@ -127,6 +127,25 @@ describe("unifiedConfigSchema", () => {
|
||||
expect(result.success).toBe(true);
|
||||
});
|
||||
|
||||
it("accepts ask as a shell alias decision floor", () => {
|
||||
const result = unifiedConfigSchema.safeParse({
|
||||
shellTools: {
|
||||
ssh_bash: { commandArgument: "command", decisionFloor: "ask" },
|
||||
},
|
||||
});
|
||||
expect(result.success).toBe(true);
|
||||
});
|
||||
|
||||
it.each(["allow", "deny", "invalid"] as const)(
|
||||
"rejects %s as a shell alias decision floor",
|
||||
(decisionFloor) => {
|
||||
const result = unifiedConfigSchema.safeParse({
|
||||
shellTools: { ssh_bash: { commandArgument: "command", decisionFloor } },
|
||||
});
|
||||
expect(result.success).toBe(false);
|
||||
},
|
||||
);
|
||||
|
||||
it("rejects an alias missing commandArgument", () => {
|
||||
const result = unifiedConfigSchema.safeParse({
|
||||
shellTools: { exec_command: { workdirArgument: "workdir" } },
|
||||
|
||||
Reference in New Issue
Block a user