fix: update integration tests to use valid tools after v2.25.0 removal

Replaced all references to removed tools in integration tests:
- list_nodes -> search_nodes
- get_database_statistics -> tools_documentation
- list_ai_tools -> search_nodes/tools_documentation
- list_tasks -> tools_documentation
- get_node_as_tool_info -> removed test section

Updated test files:
- tests/integration/mcp-protocol/basic-connection.test.ts
- tests/integration/mcp-protocol/performance.test.ts
- tests/integration/mcp-protocol/session-management.test.ts
- tests/integration/mcp-protocol/test-helpers.ts
- tests/integration/mcp-protocol/tool-invocation.test.ts
- tests/integration/telemetry/mcp-telemetry.test.ts
- tests/unit/mcp/disabled-tools.test.ts
- tests/unit/mcp/tools-documentation.test.ts

Conceived by Romuald Członkowski - https://www.aiadvisors.pl/en

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
czlonkowski
2025-11-25 13:13:26 +01:00
parent 13b8abaafb
commit 7f03f51e87
8 changed files with 175 additions and 312 deletions

View File

@@ -73,14 +73,14 @@ describe('Disabled Tools Feature (Issue #410)', () => {
});
it('should parse multiple disabled tools correctly', () => {
process.env.DISABLED_TOOLS = 'n8n_diagnostic,n8n_health_check,list_nodes';
process.env.DISABLED_TOOLS = 'n8n_diagnostic,n8n_health_check,search_nodes';
server = new TestableN8NMCPServer();
const disabledTools = server.testGetDisabledTools();
expect(disabledTools.size).toBe(3);
expect(disabledTools.has('n8n_diagnostic')).toBe(true);
expect(disabledTools.has('n8n_health_check')).toBe(true);
expect(disabledTools.has('list_nodes')).toBe(true);
expect(disabledTools.has('search_nodes')).toBe(true);
});
it('should trim whitespace from tool names', () => {
@@ -94,14 +94,14 @@ describe('Disabled Tools Feature (Issue #410)', () => {
});
it('should filter out empty entries from comma-separated list', () => {
process.env.DISABLED_TOOLS = 'n8n_diagnostic,,n8n_health_check,,,list_nodes';
process.env.DISABLED_TOOLS = 'n8n_diagnostic,,n8n_health_check,,,search_nodes';
server = new TestableN8NMCPServer();
const disabledTools = server.testGetDisabledTools();
expect(disabledTools.size).toBe(3);
expect(disabledTools.has('n8n_diagnostic')).toBe(true);
expect(disabledTools.has('n8n_health_check')).toBe(true);
expect(disabledTools.has('list_nodes')).toBe(true);
expect(disabledTools.has('search_nodes')).toBe(true);
});
it('should handle single comma correctly', () => {