mirror of
https://github.com/PR0M3TH3AN/TORCH.git
synced 2026-10-30 17:31:54 +00:00
Complete public fleet lifecycle commands
This commit is contained in:
1 parent
c714e2602d
commit
17aec17afc
10 files changed
+365
-41
No files matched your search
@@ -109,6 +109,28 @@ test('SCN-domain-approval: installation rejects stale or unapproved organization
|
||||
assert.equal(existsSync(join(root, '.torch')), false);
|
||||
});
|
||||
|
||||
test('SCN-install-runtime-selection: approved runtime choices are explicit and cover every identity', () => {
|
||||
const { root, env } = fixture();
|
||||
const repository = inspectRepository(root);
|
||||
const proposal = approvedProposal(repository);
|
||||
assert.deepEqual(planInstall({ repository, proposal, env, runtimes: ['claude'] }).runtimes, ['claude']);
|
||||
proposal.domains[0].runtime = 'codex';
|
||||
assert.throws(
|
||||
() => planInstall({ repository, proposal, env, runtimes: ['claude'] }),
|
||||
(error) => error.code === 'INSTALL_RUNTIME_MISSING' && error.details.missing.includes('codex'),
|
||||
);
|
||||
assert.throws(
|
||||
() => planInstall({ repository, proposal, env, runtimes: ['unknown'] }),
|
||||
(error) => error.code === 'INSTALL_RUNTIME_INVALID',
|
||||
);
|
||||
const installed = installProject({
|
||||
repository, proposal, env, projectId: 'runtime-selection', runtimes: ['claude', 'codex'],
|
||||
});
|
||||
assert.equal(installed.mutationPerformed, true);
|
||||
const config = JSON.parse(readFileSync(join(root, '.torch', 'torch.yaml'), 'utf8'));
|
||||
assert.deepEqual(Object.keys(config.runtimes).sort(), ['claude', 'codex', 'default']);
|
||||
});
|
||||
|
||||
test('SCN-config-schema: installed configuration is strict, versioned, and migration-aware', () => {
|
||||
const { root, env } = fixture();
|
||||
const repository = inspectRepository(root);
|
||||
|
||||
Reference in new issue
Block a user