kubernetes/pkg/controller/endpointslice/endpointslice_controller_test.go

var alwaysReady

type endpointSliceController

func newController(t *testing.T, nodeNames []string, batchPeriod time.Duration) (*fake.Clientset, *endpointSliceController) {}

func newPod(n int, namespace string, ready bool, nPorts int, terminating bool) *v1.Pod {}

func expectActions(t *testing.T, actions []k8stesting.Action, num int, verb, resource string) {}

// Ensure SyncService for service with no selector results in no action
func TestSyncServiceNoSelector(t *testing.T) {}

func TestServiceExternalNameTypeSync(t *testing.T) {}

// Ensure SyncService for service with pending deletion results in no action
func TestSyncServicePendingDeletion(t *testing.T) {}

// Ensure SyncService for service with selector but no pods results in placeholder EndpointSlice
func TestSyncServiceWithSelector(t *testing.T) {}

// Ensure SyncService gracefully handles a missing service. This test also
// populates another existing service to ensure a clean up process doesn't
// remove too much.
func TestSyncServiceMissing(t *testing.T) {}

// Ensure SyncService correctly selects Pods.
func TestSyncServicePodSelection(t *testing.T) {}

func TestSyncServiceEndpointSlicePendingDeletion(t *testing.T) {}

// Ensure SyncService correctly selects and labels EndpointSlices.
func TestSyncServiceEndpointSliceLabelSelection(t *testing.T) {}

func TestOnEndpointSliceUpdate(t *testing.T) {}

func TestSyncService(t *testing.T) {}

// TestPodAddsBatching verifies that endpoint updates caused by pod addition are batched together.
// This test uses real time.Sleep, as there is no easy way to mock time in endpoints controller now.
// TODO(mborsz): Migrate this test to mock clock when possible.
func TestPodAddsBatching(t *testing.T) {}

// TestPodUpdatesBatching verifies that endpoint updates caused by pod updates are batched together.
// This test uses real time.Sleep, as there is no easy way to mock time in endpoints controller now.
// TODO(mborsz): Migrate this test to mock clock when possible.
func TestPodUpdatesBatching(t *testing.T) {}

// TestPodDeleteBatching verifies that endpoint updates caused by pod deletion are batched together.
// This test uses real time.Sleep, as there is no easy way to mock time in endpoints controller now.
// TODO(mborsz): Migrate this test to mock clock when possible.
func TestPodDeleteBatching(t *testing.T) {}

func TestSyncServiceStaleInformer(t *testing.T) {}

func Test_checkNodeTopologyDistribution(t *testing.T) {}

func TestUpdateNode(t *testing.T) {}

// Test helpers
func addPods(t *testing.T, esController *endpointSliceController, namespace string, podsCount int) {}

func standardSyncService(t *testing.T, esController *endpointSliceController, namespace, serviceName string) {}

func createService(t *testing.T, esController *endpointSliceController, namespace, serviceName string) *v1.Service {}

func expectAction(t *testing.T, actions []k8stesting.Action, index int, verb, resource string) {}

type cacheMutationCheck

type cacheObject

// newCacheMutationCheck initializes a cacheMutationCheck with EndpointSlices.
func newCacheMutationCheck(endpointSlices []*discovery.EndpointSlice) cacheMutationCheck {}

// Add appends a runtime.Object and a deep copy of that object into the
// cacheMutationCheck.
func (cmc *cacheMutationCheck) Add(o runtime.Object) {}

// Check verifies that no objects in the cacheMutationCheck have been mutated.
func (cmc *cacheMutationCheck) Check(t *testing.T) {}

func Test_dropEndpointSlicesPendingDeletion(t *testing.T) {}