kubernetes/pkg/proxy/ipvs/proxier_test.go

const testHostname

type fakeIpvs

func (f *fakeIpvs) Flush() error {}

func (f *fakeIpvs) AddVirtualServer(*utilipvs.VirtualServer) error {}

func (f *fakeIpvs) UpdateVirtualServer(*utilipvs.VirtualServer) error {}

func (f *fakeIpvs) DeleteVirtualServer(*utilipvs.VirtualServer) error {}

func (f *fakeIpvs) GetVirtualServer(*utilipvs.VirtualServer) (*utilipvs.VirtualServer, error) {}

func (f *fakeIpvs) GetVirtualServers() ([]*utilipvs.VirtualServer, error) {}

func (f *fakeIpvs) AddRealServer(*utilipvs.VirtualServer, *utilipvs.RealServer) error {}

func (f *fakeIpvs) GetRealServers(*utilipvs.VirtualServer) ([]*utilipvs.RealServer, error) {}

func (f *fakeIpvs) DeleteRealServer(*utilipvs.VirtualServer, *utilipvs.RealServer) error {}

func (f *fakeIpvs) UpdateRealServer(*utilipvs.VirtualServer, *utilipvs.RealServer) error {}

func (f *fakeIpvs) ConfigureTimeouts(time.Duration, time.Duration, time.Duration) error {}

type fakeIPSetVersioner

func (fake *fakeIPSetVersioner) GetVersion() (string, error) {}

func NewFakeProxier(ctx context.Context, ipt utiliptables.Interface, ipvs utilipvs.Interface, ipset utilipset.Interface, nodeIPs []string, excludeCIDRs []*net.IPNet, ipFamily v1.IPFamily) *Proxier {}

func makeNSN(namespace, name string) types.NamespacedName {}

func makeServiceMap(proxier *Proxier, allServices ...*v1.Service) {}

func makeEndpointSliceMap(proxier *Proxier, allEpSlices ...*discovery.EndpointSlice) {}

func makeTestService(namespace, name string, svcFunc func(*v1.Service)) *v1.Service {}

func populateEndpointSlices(proxier *Proxier, allEndpointSlices ...*discovery.EndpointSlice) {}

func makeTestEndpointSlice(namespace, name string, sliceNum int, epsFunc func(*discovery.EndpointSlice)) *discovery.EndpointSlice {}

func TestCleanupLeftovers(t *testing.T) {}

func TestCanUseIPVSProxier(t *testing.T) {}

func TestGetNodeIPs(t *testing.T) {}

func TestNodePortIPv4(t *testing.T) {}

func TestNodePortIPv6(t *testing.T) {}

func Test_syncEndpoint_updateWeightsOnRestart(t *testing.T) {}

func TestIPv4Proxier(t *testing.T) {}

func TestIPv6Proxier(t *testing.T) {}

func TestMasqueradeRule(t *testing.T) {}

func TestExternalIPsNoEndpoint(t *testing.T) {}

func TestExternalIPs(t *testing.T) {}

func TestOnlyLocalExternalIPs(t *testing.T) {}

func TestLoadBalancer(t *testing.T) {}

func TestOnlyLocalNodePorts(t *testing.T) {}

func TestHealthCheckNodePort(t *testing.T) {}

func TestLoadBalancerSourceRanges(t *testing.T) {}

func TestAcceptIPVSTraffic(t *testing.T) {}

func TestOnlyLocalLoadBalancing(t *testing.T) {}

func addTestPort(array []v1.ServicePort, name string, protocol v1.Protocol, port, nodeport int32, targetPort int) []v1.ServicePort {}

func TestBuildServiceMapAddRemove(t *testing.T) {}

func TestBuildServiceMapServiceHeadless(t *testing.T) {}

func TestBuildServiceMapServiceTypeExternalName(t *testing.T) {}

func TestBuildServiceMapServiceUpdate(t *testing.T) {}

func TestSessionAffinity(t *testing.T) {}

func makeServicePortName(ns, name, port string, protocol v1.Protocol) proxy.ServicePortName {}

func Test_updateEndpointsMap(t *testing.T) {}

type endpointExpectation

func checkEndpointExpectations(t *testing.T, tci int, newMap proxy.EndpointsMap, expected map[proxy.ServicePortName][]endpointExpectation) {}

func Test_syncService(t *testing.T) {}

func buildFakeProxier(t *testing.T) (*iptablestest.FakeIPTables, *Proxier) {}

func getRules(ipt *iptablestest.FakeIPTables, chain utiliptables.Chain) []*iptablestest.Rule {}

// checkIptables to check expected iptables chain and rules. The got rules must have same number and order as the
// expected rules.
func checkIptables(t *testing.T, ipt *iptablestest.FakeIPTables, epIpt netlinktest.ExpectedIptablesChain) {}

// checkIPSet to check expected ipset and entries
func checkIPSet(t *testing.T, fp *Proxier, ipSet netlinktest.ExpectedIPSet) {}

// checkIPVS to check expected ipvs service and destination
func checkIPVS(t *testing.T, fp *Proxier, vs *netlinktest.ExpectedVirtualServer) {}

func TestCleanLegacyService(t *testing.T) {}

func TestCleanLegacyServiceWithRealServers(t *testing.T) {}

func TestCleanLegacyRealServersExcludeCIDRs(t *testing.T) {}

func TestCleanLegacyService6(t *testing.T) {}

func TestMultiPortServiceBindAddr(t *testing.T) {}

func Test_getFirstColumn(t *testing.T) {}

// The majority of EndpointSlice specific tests are not ipvs specific and focus on
// the shared EndpointsChangeTracker and EndpointSliceCache. This test ensures that the
// ipvs proxier supports translating EndpointSlices to ipvs output.
func TestEndpointSliceE2E(t *testing.T) {}

func TestHealthCheckNodePortE2E(t *testing.T) {}

// Test_HealthCheckNodePortWhenTerminating tests that health check node ports are not enabled when all local endpoints are terminating
func Test_HealthCheckNodePortWhenTerminating(t *testing.T) {}

func TestFilterCIDRs(t *testing.T) {}

func TestCreateAndLinkKubeChain(t *testing.T) {}

// This test ensures that the iptables proxier supports translating Endpoints to
// iptables output when internalTrafficPolicy is specified
func TestTestInternalTrafficPolicyE2E(t *testing.T) {}

// Test_EndpointSliceReadyAndTerminatingCluster tests that when there are ready and ready + terminating
// endpoints and the traffic policy is "Cluster", only the ready endpoints are used.
func Test_EndpointSliceReadyAndTerminatingCluster(t *testing.T) {}

// Test_EndpointSliceReadyAndTerminatingLocal tests that when there are local ready and ready + terminating
// endpoints, only the ready endpoints are used.
func Test_EndpointSliceReadyAndTerminatingLocal(t *testing.T) {}

// Test_EndpointSliceOnlyReadyTerminatingCluster tests that when there are only ready terminating
// endpoints and the traffic policy is "Cluster",  we fall back to terminating endpoints.
func Test_EndpointSliceOnlyReadyAndTerminatingCluster(t *testing.T) {}

// Test_EndpointSliceOnlyReadyTerminatingLocal tests that when there are only local ready terminating
// endpoints, we fall back to those endpoints.
func Test_EndpointSliceOnlyReadyAndTerminatingLocal(t *testing.T) {}

func TestIpIsValidForSet(t *testing.T) {}

func TestNoEndpointsMetric(t *testing.T) {}

func TestDismissLocalhostRuleExist(t *testing.T) {}

func TestLoadBalancerIngressRouteTypeProxy(t *testing.T) {}