Remove reasons from iptables syncProxyRules

This commit is contained in:
Wojciech Tyczynski
2017-05-12 13:31:24 +02:00
parent 1f22204119
commit 77624a12d3
2 changed files with 33 additions and 47 deletions

View File

@@ -579,7 +579,7 @@ func TestClusterIPReject(t *testing.T) {
}),
)
makeEndpointsMap(fp)
fp.syncProxyRules(syncReasonForce)
fp.syncProxyRules()
svcChain := string(servicePortChainName(svcPortName.String(), strings.ToLower(string(api.ProtocolTCP))))
svcRules := ipt.GetRules(svcChain)
@@ -628,7 +628,7 @@ func TestClusterIPEndpointsJump(t *testing.T) {
}),
)
fp.syncProxyRules(syncReasonForce)
fp.syncProxyRules()
epStr := fmt.Sprintf("%s:%d", epIP, svcPort)
svcChain := string(servicePortChainName(svcPortName.String(), strings.ToLower(string(api.ProtocolTCP))))
@@ -692,7 +692,7 @@ func TestLoadBalancer(t *testing.T) {
}),
)
fp.syncProxyRules(syncReasonForce)
fp.syncProxyRules()
proto := strings.ToLower(string(api.ProtocolTCP))
fwChain := string(serviceFirewallChainName(svcPortName.String(), proto))
@@ -749,7 +749,7 @@ func TestNodePort(t *testing.T) {
}),
)
fp.syncProxyRules(syncReasonForce)
fp.syncProxyRules()
proto := strings.ToLower(string(api.ProtocolTCP))
svcChain := string(servicePortChainName(svcPortName.String(), proto))
@@ -786,7 +786,7 @@ func TestExternalIPsReject(t *testing.T) {
)
makeEndpointsMap(fp)
fp.syncProxyRules(syncReasonForce)
fp.syncProxyRules()
kubeSvcRules := ipt.GetRules(string(kubeServicesChain))
if !hasJump(kubeSvcRules, iptablestest.Reject, svcExternalIPs, svcPort) {
@@ -819,7 +819,7 @@ func TestNodePortReject(t *testing.T) {
)
makeEndpointsMap(fp)
fp.syncProxyRules(syncReasonForce)
fp.syncProxyRules()
kubeSvcRules := ipt.GetRules(string(kubeServicesChain))
if !hasJump(kubeSvcRules, iptablestest.Reject, svcIP, svcNodePort) {
@@ -882,7 +882,7 @@ func TestOnlyLocalLoadBalancing(t *testing.T) {
}),
)
fp.syncProxyRules(syncReasonForce)
fp.syncProxyRules()
proto := strings.ToLower(string(api.ProtocolTCP))
fwChain := string(serviceFirewallChainName(svcPortName.String(), proto))
@@ -973,7 +973,7 @@ func onlyLocalNodePorts(t *testing.T, fp *Proxier, ipt *iptablestest.FakeIPTable
}),
)
fp.syncProxyRules(syncReasonForce)
fp.syncProxyRules()
proto := strings.ToLower(string(api.ProtocolTCP))
lbChain := string(serviceLBChainName(svcPortName.String(), proto))