fix: manager races, shutdown order, tool bounds

This commit is contained in:
smartass committed 2026-06-12 00:21:51 +05:00
1 parent 6bf2aa74ca
commit ae34ad1bc9
5 files changed
+115 -30

No files matched your search

+14
View File
@@ -73,6 +73,20 @@ describe('connection tools', () => {
])
})
it('add_connection rejects unknown fields', async () => {
const response = await callTool(client, 'add_connection', {
name: 'typo',
type: 'postgres',
host: 'h',
user: 'u',
readOnly: true
})
expect(response.isError).toBe(true)
const list = await callTool(client, 'list_connections')
const names = (list.json() as Array<{ name: string }>).map((c) => c.name)
expect(names).not.toContain('typo')
})
it('add_connection rejects duplicates with isError', async () => {
const response = await callTool(client, 'add_connection', {
name: 'existing',