software-defence-factory 0.3.4 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Explicit, opt-in integration qualification. Uses Docker and the native controller, never inference.
|
|
2
2
|
import assert from 'node:assert/strict';
|
|
3
|
-
import { readFileSync, writeFileSync, existsSync } from 'node:fs';
|
|
3
|
+
import { readFileSync, writeFileSync, existsSync, mkdtempSync } from 'node:fs';
|
|
4
4
|
import { resolve, join } from 'node:path';
|
|
5
5
|
import { api, configAt, save, json, containers, sleep, stream, run, ROOT } from '../factory/lib.mjs';
|
|
6
6
|
import { admitIncident } from '../factory/incident.mjs';
|
|
@@ -101,7 +101,7 @@ try {
|
|
|
101
101
|
await cli('stop');assert.equal(containers(state).length,0);await cli('up');await waitState(interrupted.id,'interrupted');
|
|
102
102
|
setConfig({timeoutSeconds:2});await cli('retry',interrupted.id);await waitState(interrupted.id,'failed');
|
|
103
103
|
assert.equal((await snapshot(interrupted.id)).runs.length,2);assert.equal(containers(state).length,0);record('stop/restart retains interrupted state; retry proves previous writer stopped');
|
|
104
|
-
const other=join(state,'second-installation');
|
|
104
|
+
const other=mkdtempSync(join(state,'second-installation-'));
|
|
105
105
|
await stream(process.execPath,[join(ROOT,'bin/software-defence-factory.mjs'),'init','--state',other,'--repo',original.repo,'--agent','mock','--check',original.check,'--port','7350']);
|
|
106
106
|
await stream(process.execPath,[join(ROOT,'bin/software-defence-factory.mjs'),'install','--state',other]);
|
|
107
107
|
assert.equal(run('docker',['image','inspect','--format','{{.Id}}',original.image]),original.image);
|