From 9d944d30a6e7700227ee23a9d6a5198ee94fe367 Mon Sep 17 00:00:00 2001 From: hangaoshuai Date: Wed, 30 May 2018 15:18:07 +0800 Subject: [PATCH] remove unused parameter in func buildFakeProxier --- pkg/proxy/ipvs/proxier_test.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkg/proxy/ipvs/proxier_test.go b/pkg/proxy/ipvs/proxier_test.go index 4a0543fa294..8b9fb556eb1 100644 --- a/pkg/proxy/ipvs/proxier_test.go +++ b/pkg/proxy/ipvs/proxier_test.go @@ -805,7 +805,7 @@ func TestLoadBalancer(t *testing.T) { func TestOnlyLocalNodePorts(t *testing.T) { nodeIP := net.ParseIP("100.101.102.103") - ipt, fp := buildFakeProxier([]net.IP{nodeIP}) + ipt, fp := buildFakeProxier() svcIP := "10.20.30.41" svcPort := 80 @@ -889,8 +889,7 @@ func TestOnlyLocalNodePorts(t *testing.T) { checkIptables(t, ipt, epIpt) } func TestLoadBalanceSourceRanges(t *testing.T) { - nodeIP := net.ParseIP("100.101.102.103") - ipt, fp := buildFakeProxier([]net.IP{nodeIP}) + ipt, fp := buildFakeProxier() svcIP := "10.20.30.41" svcPort := 80 @@ -988,7 +987,7 @@ func TestLoadBalanceSourceRanges(t *testing.T) { } func TestAcceptIPVSTraffic(t *testing.T) { - ipt, fp := buildFakeProxier(nil) + ipt, fp := buildFakeProxier() ingressIP := "1.2.3.4" externalIP := []string{"5.6.7.8"} @@ -1053,7 +1052,7 @@ func TestAcceptIPVSTraffic(t *testing.T) { } func TestOnlyLocalLoadBalancing(t *testing.T) { - ipt, fp := buildFakeProxier(nil) + ipt, fp := buildFakeProxier() svcIP := "10.20.30.41" svcPort := 80 @@ -2548,7 +2547,7 @@ func Test_cleanLegacyService(t *testing.T) { } } -func buildFakeProxier(nodeIP []net.IP) (*iptablestest.FakeIPTables, *Proxier) { +func buildFakeProxier() (*iptablestest.FakeIPTables, *Proxier) { ipt := iptablestest.NewFake() ipvs := ipvstest.NewFake() ipset := ipsettest.NewFake(testIPSetVersion)