ops: align production ETL with legacy admin source
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
normalizeAuthUser,
|
||||
normalizeAuthUsers,
|
||||
parseMode,
|
||||
readActiveAdminUserIds,
|
||||
readConfiguration,
|
||||
readSchema,
|
||||
rowsSha256,
|
||||
@@ -126,6 +127,20 @@ test("production identity preflight rejects duplicate canonical emails", () => {
|
||||
);
|
||||
});
|
||||
|
||||
test("legacy production without admin tables promotes only the designated Owner", async () => {
|
||||
const ownerId = "018f4e6d-7a11-7000-8000-000000000001";
|
||||
const source = {
|
||||
async query() {
|
||||
throw new Error("legacy fallback must not query a missing admin_users table");
|
||||
},
|
||||
};
|
||||
|
||||
assert.deepEqual(
|
||||
[...await readActiveAdminUserIds(source, new Map(), ownerId)],
|
||||
[ownerId],
|
||||
);
|
||||
});
|
||||
|
||||
test("active administrators become usable identity admins", () => {
|
||||
const ownerId = "018f4e6d-7a11-7000-8000-000000000001";
|
||||
const adminId = "018f4e6d-7a11-7000-8000-000000000002";
|
||||
|
||||
Reference in New Issue
Block a user