test(order): verify rejected XLSX imports preserve scoped database facts
This commit is contained in:
@@ -1,7 +1,13 @@
|
||||
import test from 'node:test'
|
||||
import assert from 'node:assert/strict'
|
||||
import { execute } from './client-xlsx-address-test-env.mjs'
|
||||
import { execute, databaseProfilePath } from './client-xlsx-address-test-env.mjs'
|
||||
test('XLSX rejection plan performs no network or credential reads', async () => {
|
||||
assert.equal((await execute(['--plan'], [], {})).plan, true)
|
||||
await assert.rejects(execute(['--execute'], [], {}))
|
||||
})
|
||||
test('database evidence accepts only the named TEST sibling profile', () => {
|
||||
const base = 'C:/Users/test/.codex/env/chongchong-global/test-acceptance.env'
|
||||
assert.match(databaseProfilePath('--database-profile=C:/Users/test/.codex/env/chongchong-global/test-database.env', base), /test-database.env$/)
|
||||
for (const filename of ['prod-database.env', 'dev-database.env', '../other/test-database.env'])
|
||||
assert.throws(() => databaseProfilePath('--database-profile=C:/Users/test/.codex/env/chongchong-global/' + filename, base))
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user