Public: anyone can read this; the crew can change it.
A deployed forge runs its own forge repository, which follows the forge it wa… #17060
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/16361-a-deployed-forge-runs-its-own-forge-repo → main 0 commits fork
1 file
changed +29
−0
test/own-forge.test.ts +29
| @@ -238,6 +238,35 @@ describe("first boot and claim", () => { | ||
| 238 | 238 | app.close(); |
| 239 | 239 | }); |
| 240 | 240 | |
| 241 | test("a forge deployed from a claimed one follows that one's repository, not the original", async () => { | |
| 242 | const app = await freshApp("recurse"); | |
| 243 | app.config.url = "https://test1.test"; | |
| 244 | const c = checkout("recurse-tree"); | |
| 245 | await ownForgeAtBoot(app, { FORGE_UPSTREAM: UPSTREAM }, c.tree); | |
| 246 | const made = await createUser(app.db, { | |
| 247 | origin: "seed", | |
| 248 | trusted: true, | |
| 249 | username: "dana", | |
| 250 | email: "[email protected]", | |
| 251 | password: "a-good-passphrase", | |
| 252 | adminIfFirst: true, | |
| 253 | }); | |
| 254 | if (!made.ok) throw new Error(made.error); | |
| 255 | await moveOwnForge(app, made.value); | |
| 256 | const was = process.env["FORGE_COMMIT"]; | |
| 257 | process.env["FORGE_COMMIT"] = COMMIT; | |
| 258 | try { | |
| 259 | expect(ownCode(app, {})).toEqual({ | |
| 260 | ok: true, | |
| 261 | value: { source: "https://test1.test/dana/forge.git", version: COMMIT }, | |
| 262 | }); | |
| 263 | } finally { | |
| 264 | if (was === undefined) delete process.env["FORGE_COMMIT"]; | |
| 265 | else process.env["FORGE_COMMIT"] = was; | |
| 266 | } | |
| 267 | app.close(); | |
| 268 | }); | |
| 269 | ||
| 241 | 270 | test("a forge with no deployed repository moves nothing at its claim", async () => { |
| 242 | 271 | const app = await freshApp("plain"); |
| 243 | 272 | const made = await createUser(app.db, { |
new above
offline