mirror of
https://github.com/shadowsocks/ShadowsocksX-NG.git
synced 2026-11-17 13:54:42 +00:00
test: merge duplicated cases into the stronger one
Every case here restates a rule another test already pins with the same or a wider input class: - the activation group case is byte-identical to its neighbour, minus an extra assertion; the rule snapshot version guard is re-driven with a second value of the same schemaVersion check; the global-mode deployment-failure case is a mode-literal copy of the strictly stronger direct-mode one; the clear- failure case duplicates the deferred-retry sibling - two RuntimeDocument projection cases only re-map locals, already asserted as full array equality; the IPv6-LAN endpoint case repeats the direct-mode case (the derivation reads only ports) - the three HTTP export cases varied only listenerMode while the derivation ignores it and one name contradicted its own expectation; one loop over all listener modes now states the real rule - the 0700/0600 permission baseline is one AtomicFileWriter behavior and stays pinned through RuntimeFileStoreTests, which also covers self-heal and atomic replace The command-boundary case keeps its mixed-scenario isolation check (four commands, four independent adapter counters) and drops only its unfalsifiable queriedTargetIDs claim. Co-Authored-By: DeepSeek Harness <noreply@deepseek.com>
This commit is contained in:
co-authored by
DeepSeek Harness
parent
d63d04c114
commit
e7116a5ebd
+10
-25
@@ -124,31 +124,16 @@ extension ProxyControlWorkflowIntegrationTests {
|
||||
"export http_proxy=http://127.0.0.1:11087;export https_proxy=http://127.0.0.1:11087;")
|
||||
}
|
||||
|
||||
func testHTTPExportCapabilityUsesLoopbackAddressForAllIPv4Interfaces() {
|
||||
var listen = ProxyListeningConfiguration()
|
||||
listen.listenerMode = .allIPv4Interfaces
|
||||
listen.httpPort = 8080
|
||||
XCTAssertEqual(
|
||||
HTTPExportCapability(listen: listen).copyableLine,
|
||||
"export http_proxy=http://127.0.0.1:8080;export https_proxy=http://127.0.0.1:8080;")
|
||||
}
|
||||
/// 导出行恒指向本地监听回环 127.0.0.1,与 listenerMode 无关(ADR-0034)。
|
||||
func testHTTPExportCapabilityAlwaysUsesIPv4LoopbackRegardlessOfListenerMode() {
|
||||
for mode in ListenerMode.allCases {
|
||||
var listen = ProxyListeningConfiguration(listenerMode: mode)
|
||||
listen.httpPort = 8080
|
||||
|
||||
func testHTTPExportCapabilityUsesIPv4LoopbackForDualStackMode() {
|
||||
var listen = ProxyListeningConfiguration()
|
||||
listen.listenerMode = .allIPv4AndIPv6Interfaces
|
||||
listen.httpPort = 8080
|
||||
|
||||
XCTAssertEqual(
|
||||
HTTPExportCapability(listen: listen).copyableLine,
|
||||
"export http_proxy=http://127.0.0.1:8080;export https_proxy=http://127.0.0.1:8080;")
|
||||
}
|
||||
|
||||
func testHTTPExportCapabilityBracketsIPv6LoopbackOnlyForIPv6OnlyMode() {
|
||||
var listen = ProxyListeningConfiguration()
|
||||
listen.listenerMode = .allIPv6Interfaces
|
||||
listen.httpPort = 8080
|
||||
XCTAssertEqual(
|
||||
HTTPExportCapability(listen: listen).copyableLine,
|
||||
"export http_proxy=http://127.0.0.1:8080;export https_proxy=http://127.0.0.1:8080;")
|
||||
XCTAssertEqual(
|
||||
HTTPExportCapability(listen: listen).copyableLine,
|
||||
"export http_proxy=http://127.0.0.1:8080;export https_proxy=http://127.0.0.1:8080;",
|
||||
"\(mode) 不改变导出行")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user