Skip to content
Closed
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
6 changes: 5 additions & 1 deletion test/integration/api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2146,8 +2146,12 @@ describe("api routes", () => {
});

it("serves installation repair diagnostics and refreshes installation health", async () => {
// Deterministic manifest fetch: avoids racing a real network call before the first /repair request below.
vi.stubGlobal("fetch", async () => new Response("not found", { status: 404 }));
const app = createApp();
const env = createTestEnv({ GITHUB_APP_PRIVATE_KEY: await generatePrivateKeyPem() });
// Must differ from the default self-repo name (test/helpers/d1.ts), or loadRepoFocusManifest's self-repo
// fallback still injects the live repo's autonomy:auto block despite the stub above.
const env = createTestEnv({ GITHUB_APP_PRIVATE_KEY: await generatePrivateKeyPem(), LOOPOVER_DRIFT_ISSUE_REPO: "unrelated-org/unrelated-repo" });
const repoPayload = { name: "gittensory", full_name: "JSONbored/gittensory", private: true, default_branch: "main", owner: { login: "JSONbored" } };
await upsertInstallation(env, {
installation: {
Expand Down
Loading