feat(lanes): add MIGRATIONS_DIR + GENERATED_MERGE_PATHS profile declarations (E2)

This commit is contained in:
2026-08-05 10:30:41 +07:00
parent 77d79a59d7
commit a4246528fe
2 changed files with 31 additions and 0 deletions
+21
View File
@@ -90,3 +90,24 @@ describe("hookEnv extraEnv", () => {
slots.releaseSlot(lane.id);
});
});
describe("resolveProfile — E2 declarations", () => {
it("defaults MIGRATIONS_DIR to empty and GENERATED_MERGE_PATHS to an empty array", () => {
const lane = makeLane();
writeProfile(lane.cwd, "PORTS=api\n");
const profile = profileLib.resolveProfile(lanesLib.getLane(lane.id));
assert.equal(profile.env.MIGRATIONS_DIR, "");
assert.deepEqual(profile.generatedMergePaths, []);
});
it("parses declared MIGRATIONS_DIR and GENERATED_MERGE_PATHS", () => {
const lane = makeLane();
writeProfile(
lane.cwd,
'PORTS=api\nMIGRATIONS_DIR="db/migrations"\nGENERATED_MERGE_PATHS="api/openapi.json api/client.ts"\n'
);
const profile = profileLib.resolveProfile(lanesLib.getLane(lane.id));
assert.equal(profile.env.MIGRATIONS_DIR, "db/migrations");
assert.deepEqual(profile.generatedMergePaths, ["api/openapi.json", "api/client.ts"]);
});
});