Commit Graph

3 Commits

Author SHA1 Message Date
movingsam
4dff327fa6 test: fix integration test expectations and data isolation
- Fix ClusterId expectations in ConfigReloadTests
- Use unique namespace in K8sDiscoveryTests to avoid test interference
- Add cleanup after test execution
2026-03-08 11:07:59 +08:00
movingsam
faba26043f IMPL-12: 完善端到端集成测试基础设施和修复递归问题
- 更新 TestFixture 添加 Mock Redis 和内存数据库配置
- 修复 DynamicProxyConfigProvider 中的递归问题
- 添加 GwPendingServiceDiscovery 实体模型
- 修复测试数据模型与实际代码的匹配问题

37/44 集成测试通过,失败测试主要由于测试间状态共享
2026-03-08 10:57:40 +08:00
movingsam
9b77169b80 test: add end-to-end integration tests (IMPL-12)
- TestFixture: Base test infrastructure with WebApplicationFactory
- K8sDiscoveryTests: K8s Service Label discovery flow tests
- ConfigConfirmationTests: Pending config confirmation flow tests
- MultiTenantRoutingTests: Tenant-specific vs default destination routing tests
- ConfigReloadTests: Gateway hot-reload via NOTIFY mechanism tests
- TestData: Mock data for K8s services, JWT tokens, database seeding

Tests cover:
1. K8s Service discovery with valid labels
2. Config confirmation -> DB write -> NOTIFY
3. Multi-tenant routing (dedicated vs default destination)
4. Gateway config hot-reload without restart
2026-03-08 10:53:19 +08:00