14 lines
944 B
JavaScript
14 lines
944 B
JavaScript
/** Fixed-target numbered migration and restore acceptance. Only the existing guarded runner creates
|
|
* the disposable PostgreSQL; no connection/remote/restore arguments accepted. */
|
|
import assert from 'node:assert/strict'
|
|
import {spawn} from 'node:child_process'
|
|
import {dirname,resolve} from 'node:path'
|
|
import {fileURLToPath} from 'node:url'
|
|
assert.equal(process.argv.length,2,'Settings epoch acceptance takes no target or connection arguments')
|
|
const root=resolve(dirname(fileURLToPath(import.meta.url)),'../..')
|
|
const child=spawn(process.execPath,[resolve(root,'backend/scripts/test-mcp-postgres.mjs'),'--server-poll-storage-fresh'],{
|
|
cwd:root,windowsHide:true,stdio:'inherit',env:{...process.env,NODE_ENV:'test',MMAPP_OWN_SERVER_POLL_SETTINGS_EPOCH:'true',MMAPP_OWN_SERVER_POLL_HTTP_ROUTE:'false'},
|
|
})
|
|
const code=await new Promise((done,reject)=>{child.once('error',reject);child.once('exit',code=>done(code??1))})
|
|
process.exitCode=code
|