mirror of
https://github.com/hansjone/dsh-im-ops.git
synced 2026-10-09 04:13:17 +08:00
fix: complete per-bot agent preset lifecycle
This commit is contained in:
parent
8ab4b9e7de
commit
01576f65c6
27 changed files with 721 additions and 208 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { mkdtemp } from 'node:fs/promises';
|
||||
import { mkdtemp, readFile } from 'node:fs/promises';
|
||||
import { tmpdir } from 'node:os';
|
||||
import { join } from 'node:path';
|
||||
import test from 'node:test';
|
||||
|
|
@ -87,6 +87,14 @@ test('production assembly keeps secrets in credentials and creates per-bot runti
|
|||
createConnectionSupervisor: () => supervisor,
|
||||
});
|
||||
|
||||
assert.equal(seen.harnessOptions.agentPreset, 'router-standard');
|
||||
assert.equal(Object.hasOwn(seen.harnessOptions, 'agentPreset'), false);
|
||||
await seen.controllerOptions.createRuntime({
|
||||
botId: 'dt_new',
|
||||
config: { botId: 'dt_new', clientId: 'dingnew' },
|
||||
clientSecret: 'host-only-secret',
|
||||
});
|
||||
const stored = JSON.parse(await readFile(join(directory, 'workspaces.json'), 'utf8'));
|
||||
assert.equal(stored.agentPresets.dt_new, 'router-standard');
|
||||
assert.equal(Object.hasOwn(stored.agentPresets, 'dt_abc'), false);
|
||||
await productionWithPreset.close();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue