feat(server): configure workspace service port allocation (#2165)
* starr * fix(server): honor service port allocator contracts * fix(server): pass workspace context to port scripts * fix(server): cancel released service port plans * test(server): support Windows port allocator fixtures * docs(worktrees): clarify shell-less portScript execution
This commit is contained in:
@@ -33,6 +33,28 @@ describe("paseo config schema", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("parses service port allocation", () => {
|
||||
expect(
|
||||
PaseoConfigSchema.parse({
|
||||
worktree: {
|
||||
servicePorts: { range: "3000-4000", portScript: "/usr/bin/portmake" },
|
||||
},
|
||||
}),
|
||||
).toEqual({
|
||||
worktree: {
|
||||
setup: [],
|
||||
teardown: [],
|
||||
servicePorts: { range: "3000-4000", portScript: "/usr/bin/portmake" },
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it("rejects invalid service port ranges", () => {
|
||||
expect(() =>
|
||||
PaseoConfigRawSchema.parse({ worktree: { servicePorts: { range: "4000-3000" } } }),
|
||||
).toThrow("Expected an inclusive TCP port range");
|
||||
});
|
||||
|
||||
it("normalizes partial worktree lifecycle config without dropping present commands", () => {
|
||||
expect(
|
||||
PaseoConfigSchema.parse({
|
||||
|
||||
Reference in New Issue
Block a user