test(cli): mount the never-dispose plugin through --config
The headless shutdown probe needs a plugin that refuses to dispose, so the second Ctrl+C has something to force past. Writing it to the Harness home stopped working when the personal composition layer was deleted: nothing is discovered there, the plugin never mounted, and the first signal drained cleanly — leaving the second PTY action to time out.
This commit is contained in:
@@ -66,7 +66,10 @@ async function runHeadlessPtySmoke(): Promise<string> {
|
|||||||
try {
|
try {
|
||||||
const home = join(cwd, '.dsh')
|
const home = join(cwd, '.dsh')
|
||||||
await mkdir(home, { recursive: true })
|
await mkdir(home, { recursive: true })
|
||||||
await writeFile(join(home, 'config.yaml'), [
|
// The overlay is named, not discovered: nothing is auto-loaded from the
|
||||||
|
// Harness home, and `-p` takes `--config` for exactly this reason.
|
||||||
|
const overlay = join(cwd, 'never-dispose.cordis.yml')
|
||||||
|
await writeFile(overlay, [
|
||||||
'- insert:',
|
'- insert:',
|
||||||
' - id: never-dispose',
|
' - id: never-dispose',
|
||||||
` name: '${neverDisposePlugin}'`,
|
` name: '${neverDisposePlugin}'`,
|
||||||
@@ -74,7 +77,7 @@ async function runHeadlessPtySmoke(): Promise<string> {
|
|||||||
].join('\n'))
|
].join('\n'))
|
||||||
const launch = resolveExampleLaunch({
|
const launch = resolveExampleLaunch({
|
||||||
srcBin: dshBinScript,
|
srcBin: dshBinScript,
|
||||||
configArgs: ['-p', 'never complete'],
|
configArgs: ['-p', 'never complete', '--config', overlay],
|
||||||
tsconfigPath,
|
tsconfigPath,
|
||||||
env: {
|
env: {
|
||||||
DSH_HOME: home,
|
DSH_HOME: home,
|
||||||
|
|||||||
Reference in New Issue
Block a user