fix: manager races, shutdown order, tool bounds
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user