Public: anyone can read this; the crew can change it.
The nightly release was held: tests failed on 2bf503906 #15953
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/15952-the-nightly-release-was-held-tests-faile → main 0 commits fork
2 files
changed +14
−2
src/apps/certificate.ts +3 −1
| @@ -19,6 +19,8 @@ const DAY_MS = 86_400_000; | ||
| 19 | 19 | /** Where to dial and how to resolve; tests point these at a local port. */ |
| 20 | 20 | export interface ProbeOptions extends OutboundOptions { |
| 21 | 21 | readonly port?: number; |
| 22 | /** Opens the TLS connection; tests pass one that never leaves the machine. */ | |
| 23 | readonly dial?: typeof connect; | |
| 22 | 24 | } |
| 23 | 25 | |
| 24 | 26 | /** |
| @@ -53,7 +55,7 @@ export async function probeCertificate( | ||
| 53 | 55 | }; |
| 54 | 56 | // rejectUnauthorized stays off only to read an expired certificate's date; |
| 55 | 57 | // nothing is sent over this connection. |
| 56 | const socket = connect( | |
| 58 | const socket = (options.dial ?? connect)( | |
| 57 | 59 | { |
| 58 | 60 | host: address, |
| 59 | 61 | port: options.port ?? 443, |
test/outbound-guard.test.ts +11 −1
| @@ -21,7 +21,9 @@ import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, test } fr | ||
| 21 | 21 | import { Glob } from "bun"; |
| 22 | 22 | import { mkdtemp, rm } from "node:fs/promises"; |
| 23 | 23 | import { tmpdir } from "node:os"; |
| 24 | import { Socket } from "node:net"; | |
| 24 | 25 | import { join } from "node:path"; |
| 26 | import { TLSSocket } from "node:tls"; | |
| 25 | 27 | import { createApp, type App } from "../src/app.ts"; |
| 26 | 28 | import { vetClone } from "../src/actions/migrate.ts"; |
| 27 | 29 | import { probeCertificate } from "../src/apps/certificate.ts"; |
| @@ -183,7 +185,15 @@ const SITES: readonly Site[] = [ | ||
| 183 | 185 | fetches: false, |
| 184 | 186 | names: true, |
| 185 | 187 | refused: async (t) => { |
| 186 | const said = await probeCertificate(t.bare, { resolve: t.resolve }); | |
| 188 | const said = await probeCertificate(t.bare, { | |
| 189 | resolve: t.resolve, | |
| 190 | // A public address must not be dialled for real: unrouted, it hangs until the 5 s timeout. | |
| 191 | dial: () => { | |
| 192 | const socket = new TLSSocket(new Socket()); | |
| 193 | queueMicrotask(() => socket.emit("error", new Error("no network in this test"))); | |
| 194 | return socket; | |
| 195 | }, | |
| 196 | }); | |
| 187 | 197 | return "error" in said && said.error.includes("private address"); |
| 188 | 198 | }, |
| 189 | 199 | }, |
new above
offline