@@ -125,7 +125,7 @@ func (fakeSysctl *FakeSysctl) SetSysctl(sysctl string, newVal int) error {
125
125
return nil
126
126
}
127
127
128
- func NewFakeProxier (ipt utiliptables.Interface , ipvs utilipvs.Interface , ipset utilipset.Interface , nodeIPs []net.IP , excludeCIDRs []string ) * Proxier {
128
+ func NewFakeProxier (ipt utiliptables.Interface , ipvs utilipvs.Interface , ipset utilipset.Interface , nodeIPs []net.IP , excludeCIDRs []* net. IPNet ) * Proxier {
129
129
fcmd := fakeexec.FakeCmd {
130
130
CombinedOutputScript : []fakeexec.FakeCombinedOutputAction {
131
131
func () ([]byte , error ) { return []byte ("dummy device have been created" ), nil },
@@ -2823,7 +2823,7 @@ func TestCleanLegacyService(t *testing.T) {
2823
2823
ipt := iptablestest .NewFake ()
2824
2824
ipvs := ipvstest .NewFake ()
2825
2825
ipset := ipsettest .NewFake (testIPSetVersion )
2826
- fp := NewFakeProxier (ipt , ipvs , ipset , nil , []string {"3.3.3.0/24" , "4.4.4.0/24" })
2826
+ fp := NewFakeProxier (ipt , ipvs , ipset , nil , ParseExcludedCIDRs ( []string {"3.3.3.0/24" , "4.4.4.0/24" }) )
2827
2827
2828
2828
// All ipvs services that were processed in the latest sync loop.
2829
2829
activeServices := map [string ]bool {"ipvs0" : true , "ipvs1" : true }
@@ -2930,7 +2930,7 @@ func TestCleanLegacyRealServersExcludeCIDRs(t *testing.T) {
2930
2930
ipvs := ipvstest .NewFake ()
2931
2931
ipset := ipsettest .NewFake (testIPSetVersion )
2932
2932
gtm := NewGracefulTerminationManager (ipvs )
2933
- fp := NewFakeProxier (ipt , ipvs , ipset , nil , []string {"4.4.4.4/32" })
2933
+ fp := NewFakeProxier (ipt , ipvs , ipset , nil , ParseExcludedCIDRs ( []string {"4.4.4.4/32" }) )
2934
2934
fp .gracefuldeleteManager = gtm
2935
2935
2936
2936
vs := & utilipvs.VirtualServer {
@@ -2984,7 +2984,7 @@ func TestCleanLegacyService6(t *testing.T) {
2984
2984
ipt := iptablestest .NewFake ()
2985
2985
ipvs := ipvstest .NewFake ()
2986
2986
ipset := ipsettest .NewFake (testIPSetVersion )
2987
- fp := NewFakeProxier (ipt , ipvs , ipset , nil , []string {"3000::/64" , "4000::/64" })
2987
+ fp := NewFakeProxier (ipt , ipvs , ipset , nil , ParseExcludedCIDRs ( []string {"3000::/64" , "4000::/64" }) )
2988
2988
fp .nodeIP = net .ParseIP ("::1" )
2989
2989
2990
2990
// All ipvs services that were processed in the latest sync loop.
0 commit comments