Public: anyone can read this; the crew can change it.
Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:1u9vh0qxrj is past its budget: trevato/forge: "a burst of errors: the board says so, one page, no more; clear for five minutes: one Recovered, all fin… #5137
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/5107-sentinel-shared-01m23vygyffx5hg2f5vm8r74 → main 3 commits fork
1 file
changed +3
−2
test/forge-degraded.test.ts +3 −2
| @@ -34,7 +34,7 @@ const at = async (min: number): Promise<void> => { | ||
| 34 | 34 | |
| 35 | 35 | beforeAll(async () => { |
| 36 | 36 | dataDir = await mkdtemp(join(tmpdir(), "forge-degraded-")); |
| 37 | app = createApp({ dataDir, port: 0 }); | |
| 37 | app = createApp({ dataDir, port: 0, disk: () => ({ freeBytes: 95, totalBytes: 100 }) }); | |
| 38 | 38 | servers = await serve(app); |
| 39 | 39 | const made = await createUser(app.db, { |
| 40 | 40 | origin: "seed", |
| @@ -79,11 +79,12 @@ afterAll(async () => { | ||
| 79 | 79 | test("a burst of errors: the board says so, one page, no more; clear for five minutes: one Recovered, all fine", async () => { |
| 80 | 80 | expect(await board()).toContain("All fine"); |
| 81 | 81 | |
| 82 | app.signals.errors.clear(); | |
| 82 | 83 | for (let i = 0; i < ERROR_BURST; i++) app.signals.errors.record("test", "boom", clock); |
| 83 | 84 | await at(0); |
| 84 | 85 | const burst = await board(); |
| 85 | 86 | expect(burst).toMatch(/data-ok="no"/); |
| 86 | expect(burst).toMatch(/data-need href="\/settings\/capacity#errors">[\s\S]*?20 errors in the last hour/); | |
| 87 | expect(burst).toMatch(/data-need href="\/settings\/capacity#errors">[\s\S]*?\d+ errors in the last hour/); | |
| 87 | 88 | expect(burst).not.toContain("All fine"); |
| 88 | 89 | await at(4); |
| 89 | 90 | expect(posts).toHaveLength(0); |
new above
offline