fix: render registry workspaces for harness
This commit is contained in:
@@ -601,6 +601,8 @@ test("session lifecycle locates a B session when installation default is A", asy
|
||||
provider: "zai", model: "glm-5.2", thinking: "low",
|
||||
};
|
||||
const calls: string[] = [];
|
||||
const runtimeSources: string[] = [];
|
||||
const runtimeOptions: string[] = [];
|
||||
let active: any;
|
||||
const app = buildApp(loadConfig({ THT_HARNESS_DIR: "../harness" }), {
|
||||
thtRunner: {
|
||||
@@ -622,11 +624,21 @@ test("session lifecycle locates a B session when installation default is A", asy
|
||||
calls.push(`reopen:${workspace}`);
|
||||
expect(id).toBe("session-b");
|
||||
},
|
||||
acquireWorkspaceRuntime: (workspace: string) => {
|
||||
runtimeSources.push(workspace);
|
||||
return {
|
||||
path: `/runtime/${runtimeSources.length}.yaml`,
|
||||
workspaceId: "b-workspace",
|
||||
workspaceRevision: "c".repeat(40),
|
||||
release: vi.fn(),
|
||||
};
|
||||
},
|
||||
} as any,
|
||||
readiness: { ensure: async () => ({ ok: true }) } as any,
|
||||
mgr: {
|
||||
get: () => active,
|
||||
createFor: () => {
|
||||
createFor: (_id: string, options: any) => {
|
||||
runtimeOptions.push(options.runtimeConfig?.path ?? "missing");
|
||||
active = { bridge: { onClientEvent: () => {}, respond: () => true, turnState: () => "idle" } };
|
||||
return active;
|
||||
},
|
||||
@@ -673,6 +685,8 @@ test("session lifecycle locates a B session when installation default is A", asy
|
||||
expect(calls).toContain(`list:${bPath}`);
|
||||
expect(calls).toContain(`show:${bPath}`);
|
||||
expect(calls).toContain(`reopen:${bPinnedPath}`);
|
||||
expect(runtimeSources).toEqual([bPath, bPinnedPath]);
|
||||
expect(runtimeOptions).toEqual(["/runtime/1.yaml", "/runtime/2.yaml"]);
|
||||
});
|
||||
|
||||
test("POST /sessions usa i settings (workspace/provider/model/thinking) e crea+avvia", async () => {
|
||||
|
||||
Reference in New Issue
Block a user