Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/recover/observe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,12 @@ export async function observeSelfCheck(
"--json",
"--base",
input.base,
...(input.folder === undefined ? [] : ["--folder", input.folder]),
// With a Folder the judge (`requireSelfCheck`) expects the Launchpad
// probe in the answer, so the observation asks the same question:
// read-only, on a private socket (docs/update.md "Activation").
...(input.folder === undefined
? []
: ["--folder", input.folder, "--launchpad"]),
],
input.timeoutMs ?? defaultSelfCheckTimeoutMs,
);
Expand Down
8 changes: 7 additions & 1 deletion tests/fixtures/update-world.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,17 @@ export function executable(
: { templateRevision: options.templateRevision }),
base: { active: null, highWater: null },
folder: { preferences: 1, manifest: 1 },
});
// As the product does: the probe answers only when it was asked for
// (`--launchpad`); a caller that judges the answer must ask the question
// (LazurioPlatform issue #74).
const withProbe = JSON.stringify({
...JSON.parse(report),
launchpad: { probe: "ok" },
});
const probe =
options.launchpadRefused === undefined
? ""
? `case " $* " in *" --launchpad "*) echo '${withProbe}'; exit 0;; esac\n`
: `case " $* " in *" --launchpad "*) echo '${JSON.stringify({ launchpadRefused: options.launchpadRefused })}'; exit 1;; esac\n`;
return new TextEncoder().encode(
`#!/bin/sh\n${options.healthy === false ? "exit 1\n" : ""}${probe}echo '${report}'\n`,
Expand Down
1 change: 1 addition & 0 deletions tests/install-script.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ test.skipIf(!supported)(
}
for (const line of requests) expect(line).toContain("--proto =https");
},
30_000,
);

test.skipIf(!supported)(
Expand Down
Loading