This commit is contained in:
2026-08-25 10:39:43 +08:00
parent 52b9fc382f
commit a6be840588
2 changed files with 10 additions and 0 deletions
@@ -4,6 +4,7 @@ import { readFileSync } from 'node:fs'
const acceptance = readFileSync(new URL('./phase3-warehouse-rbac.mjs', import.meta.url), 'utf8')
const iamSql = readFileSync(new URL('../../iam/src/main/resources/db/lastleg-permissions.sql', import.meta.url), 'utf8')
const unifiedSql = readFileSync(new URL('../../deploy/sql/头程数据库统一增量-MySQL8.sql', import.meta.url), 'utf8')
const listCodes = [
'platform:overseas-warehouse:last-mile-order:list',
@@ -37,3 +38,11 @@ test('picker stays isolated to the dedicated overseas PDA authority', () => {
assert.match(iamSql, /role\.role_code='WAREHOUSE_PICKER'/)
assert.match(iamSql, /permission\.permission_code='lastleg:pda:operate'/)
})
test('unified migration creates the phase-four role matrix in the IAM schema used by its assertion routine', () => {
assert.match(
unifiedSql,
/USE baiyue_iam;\s*DROP TEMPORARY TABLE IF EXISTS tmp_phase4_warehouse_role_permission;\s*CREATE TEMPORARY TABLE tmp_phase4_warehouse_role_permission/,
)
assert.match(unifiedSql, /CREATE PROCEDURE baiyue_iam\.assert_phase4_warehouse_role_minimum\(\)/)
})