优化
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import assert from 'node:assert/strict'
|
||||
import { readFile } from 'node:fs/promises'
|
||||
import test from 'node:test'
|
||||
|
||||
const pipeline = (await readFile(new URL('../Jenkinsfile', import.meta.url), 'utf8'))
|
||||
.replaceAll('\r\n', '\n')
|
||||
|
||||
test('AUTO detects database migrations without expanding them to all services', () => {
|
||||
assert.match(pipeline, /def databaseMigrationPaths = \['deploy\/sql\/'\]/)
|
||||
assert.match(pipeline, /!databaseMigration && commonPaths\.any/)
|
||||
assert.match(pipeline, /env\.DATABASE_CHANGE_DETECTED = databaseChanged \? 'true' : 'false'/)
|
||||
})
|
||||
|
||||
test('database-only changes are reported as a separate migration action', () => {
|
||||
assert.match(pipeline, /仅数据库迁移变更 \| 需单独审核执行/)
|
||||
assert.match(pipeline, /统一 SQL 须独立审核并执行/)
|
||||
})
|
||||
Reference in New Issue
Block a user