Add end-to-end forwarding integration test
This commit is contained in:
@@ -153,13 +153,14 @@ tests/run_all.sh --skip-integration
|
||||
- `tests/test_storage.sh`:规则存储
|
||||
- `tests/test_env_check.sh`:环境检查与修复
|
||||
- `tests/test_rules_unit.sh`:mock iptables 下的增删回滚与并发写保护
|
||||
- `tests/test_integration.sh`:真实 iptables 生命周期 + save/reload 持久化回放测试
|
||||
- `tests/test_integration.sh`:真实 iptables 生命周期 + 命名空间端到端 IPv4/IPv6 TCP 转发 + save/reload 持久化回放测试
|
||||
|
||||
`tests/test_integration.sh` 的执行策略:
|
||||
|
||||
- root 环境下直接执行
|
||||
- 非 root 但支持 `unshare -Urn` 时,会进入隔离网络命名空间执行
|
||||
- 两者都不满足时会输出 `SKIP`
|
||||
- 流量验证会额外创建 client / router / backend 三段临时 veth + netns,并用 Python TCP server 验证 IPv4/IPv6 add / reload / delete 对真实转发流量的影响
|
||||
- 持久化验证不会直接改写宿主 `/etc/iptables`,而是通过临时 `netfilter-persistent` 包装器把 `save/reload` 落到测试目录中的 `rules.v4` / `rules.v6`
|
||||
|
||||
## 手工验收建议
|
||||
|
||||
Reference in New Issue
Block a user