fix: render registry workspaces for harness
This commit is contained in:
@@ -168,6 +168,27 @@ function recordingChild() {
|
||||
return ch;
|
||||
}
|
||||
|
||||
test("Pi receives the leased workspace runtime config and releases it on direct teardown", () => {
|
||||
const child = recordingChild();
|
||||
let spawnEnv: NodeJS.ProcessEnv | undefined;
|
||||
const release = vi.fn();
|
||||
const mgr = new PiProcessManager(loadConfig({}), {
|
||||
spawnFn: (_command, _args, options) => {
|
||||
spawnEnv = options.env;
|
||||
return child as any;
|
||||
},
|
||||
});
|
||||
|
||||
mgr.createFor("canonical-runtime", {
|
||||
runtimeConfig: { path: "/trusted/runtime-uuid.yaml", release },
|
||||
} as any);
|
||||
expect(spawnEnv?.THT_CONFIG).toBe("/trusted/runtime-uuid.yaml");
|
||||
|
||||
// The child deliberately emits neither exit nor close. Ownership cleanup must not depend on it.
|
||||
mgr.teardown("canonical-runtime");
|
||||
expect(release).toHaveBeenCalledOnce();
|
||||
});
|
||||
|
||||
test.each([
|
||||
["new", "auth.json", '{"deepseek":{"key":"!runtime-auth-command runtime-secret /private/runtime-auth"}}\n'],
|
||||
["new", "models.json", '{"providers":{"local-qwen":{"headers":["!runtime-model-command runtime-secret /private/runtime-model"]}}}\n'],
|
||||
|
||||
Reference in New Issue
Block a user