mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-02-06 05:23:08 +00:00
Adds 200+ test scenarios covering all aspects of the multi-tenant implementation: Test Coverage: - Instance context URL validation (120+ tests) - IPv4/IPv6 address validation - Domain name and port validation - Security checks for XSS/injection attempts - Edge cases and malformed URLs - MCP server tool registration (40+ tests) - Dynamic tool availability based on configuration - Environment variable backward compatibility - Instance context support - Multi-tenant flag behavior - HTTP server multi-tenant functions (30+ tests) - Header extraction and type safety - Session ID generation with config hash - Context switching with locking - Security logging sanitization - Integration tests (40 tests) - End-to-end scenarios - Configuration priority logic - Real-world deployment patterns Coverage Metrics: - 83.78% statement coverage on core validation - 100% function coverage - 121/126 URL validation tests passing - 40/40 integration tests passing Test suites provide robust validation of both happy paths and edge cases, ensuring the multi-tenant implementation is secure and reliable. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>