Let a caller say how long to wait, and note where the artifact-store test

went

`exec` waited two minutes always. A build, or anything that waits on
another machine, needs longer — and a caller that cannot say so has to
split the work to fit, which is a test shaped by its harness rather than
by what it is testing.

The scenario also places a build machine when one is given, so anything
in it can ask the mesh to build something. Nothing else here would start
one.

And the mesh-runs-its-own-artifact-store test is not here. It needs a
fourth image so the module has a registry to mirror, and that is caught
behind 04-ISSUES/012 — left as a note saying where it went and why,
rather than silently deleted, because what it asserted is worth
asserting.
This commit is contained in:
2026-08-30 20:41:10 +02:00
parent c98ee7a82d
commit 2f81701a13
2 changed files with 45 additions and 7 deletions
+7 -1
View File
@@ -54,12 +54,18 @@ export async function exec(
instanceId: string,
machine: string,
command: string[],
/**
* How long to wait. Two minutes suits a command; a build, or anything that waits on another
* machine, needs longer — and a caller that cannot say so has to split the work up to fit,
* which is a test shaped by its harness rather than by what it is testing.
*/
timeoutMs = 120_000,
): Promise<{ stdout: string; stderr: string }> {
const found = (await taggedInstances()).find(
(i) => i.instanceId === instanceId && i.machine === machine,
);
const name = found?.name ?? machineName(instanceId, machine);
return incus(["exec", name, "--", ...command], 120_000);
return incus(["exec", name, "--", ...command], timeoutMs);
}
/**