diff --git a/pm-stack/aggregator/test/board-in-flight.test.ts b/pm-stack/aggregator/test/board-in-flight.test.ts index 64e006866f..16641c8f0e 100644 --- a/pm-stack/aggregator/test/board-in-flight.test.ts +++ b/pm-stack/aggregator/test/board-in-flight.test.ts @@ -93,7 +93,7 @@ describe("titleRefs", () => { "developing-today/opencode#927", "developing-today-forks/kaneo#42", "dezren39/nix#889", - "developing-today/openchamber#492", + "developing-today-forks/openchamber#492", ]); }); }); @@ -244,8 +244,8 @@ describe("inFlightBoardItems", () => { ]); expect(out).toHaveLength(1); - expect(out[0].links.map((link) => link.ref)).toEqual(["developing-today/openchamber#492"]); - expect(out[0].repo).toBe("developing-today/openchamber"); + expect(out[0].links.map((link) => link.ref)).toEqual(["developing-today-forks/openchamber#492"]); + expect(out[0].repo).toBe("developing-today-forks/openchamber"); }); test("does not let a title-only collision hide a task with distinct refs", () => { @@ -299,7 +299,7 @@ describe("inFlightBoardItems", () => { expect(by944?.links.map((l) => l.ref)).toContain("developing-today/code#985"); expect(out.find((i) => i.title.includes("#889"))?.repo).toBe("dezren39/nix"); expect(out.find((i) => i.title.includes("#492"))?.links.map((l) => l.ref)).toEqual([ - "developing-today/openchamber#492", + "developing-today-forks/openchamber#492", ]); }); }); @@ -356,8 +356,8 @@ describe("renderBoard in-flight lane", () => { ]); const html = renderBoard([...lane, ...existing], items, provenance); - expect(html).toContain('href="https://github.com/developing-today/openchamber/issues/492"'); - expect(html.match(/href="https:\/\/github.com\/developing-today\/openchamber\/issues\/492"/g)).toHaveLength(1); + expect(html).toContain('href="https://github.com/developing-today-forks/openchamber/issues/492"'); + expect(html.match(/href="https:\/\/github.com\/developing-today-forks\/openchamber\/issues\/492"/g)).toHaveLength(1); expect(html.match(/href="https:\/\/github.com\/developing-today\/code\/issues\/944"/g)).toHaveLength(1); }); }); diff --git a/pm-stack/aggregator/test/collect-fleet-feed-args-3509.test.ts b/pm-stack/aggregator/test/collect-fleet-feed-args-3509.test.ts index 7c5189419c..3d60407fbe 100644 --- a/pm-stack/aggregator/test/collect-fleet-feed-args-3509.test.ts +++ b/pm-stack/aggregator/test/collect-fleet-feed-args-3509.test.ts @@ -8,13 +8,22 @@ // error (exit 2) naming the offending token, with no collection or // file-write side effect. A valid explicit --out and the no-argument // default keep working. -import { describe, expect, test } from "bun:test"; +import { afterAll, beforeAll, describe, expect, test } from "bun:test"; import { mkdtemp, readdir, rm, stat } from "node:fs/promises"; import { tmpdir } from "node:os"; import { join } from "node:path"; const script = join(import.meta.dir, "../scripts/collect-fleet-feed.ts"); +// The collector POSTs a freshness notice after publishing and exits 1 when +// that fails, so a successful run needs a listener; a stub keeps the test +// hermetic instead of depending on a live aggregator on 127.0.0.1:4871. +let freshnessStub: ReturnType; +beforeAll(() => { + freshnessStub = Bun.serve({ port: 0, hostname: "127.0.0.1", fetch: () => new Response("{}") }); +}); +afterAll(() => freshnessStub.stop(true)); + async function runScript( home: string, cwd: string, @@ -27,6 +36,7 @@ async function runScript( HOME: home, TMPDIR: home, FLEET_FEED_OUT: join(home, "feed.json"), + PM_AGG_FRESHNESS_URL: `http://127.0.0.1:${freshnessStub.port}/publish`, }, stdout: "pipe", stderr: "pipe",