kubernetes/pkg/registry/core/service/storage/storage_test.go

// Most tests will use this to create a registry to run tests against.
func newStorage(t *testing.T, ipFamilies []api.IPFamily) (*wrapperRESTForTests, *StatusREST, *etcd3testing.EtcdTestServer) {}

func newStorageWithPods(t *testing.T, ipFamilies []api.IPFamily, pods []api.Pod, endpoints []*api.Endpoints) (*wrapperRESTForTests, *StatusREST, *etcd3testing.EtcdTestServer) {}

func makeIPAllocator(cidr *net.IPNet) ipallocator.Interface {}

func makePortAllocator(ports machineryutilnet.PortRange) portallocator.Interface {}

type wrapperRESTForTests

func (f *wrapperRESTForTests) Create(ctx context.Context, obj runtime.Object, createValidation rest.ValidateObjectFunc, options *metav1.CreateOptions) (runtime.Object, error) {}

// This is used in generic registry tests.
func validService() *api.Service {}

func TestGenericCreate(t *testing.T) {}

func TestGenericUpdate(t *testing.T) {}

func TestGenericDelete(t *testing.T) {}

func TestGenericGet(t *testing.T) {}

func TestGenericList(t *testing.T) {}

func TestGenericWatch(t *testing.T) {}

func TestGenericShortNames(t *testing.T) {}

func TestGenericCategories(t *testing.T) {}

func TestNormalizeClusterIPs(t *testing.T) {}

func TestPatchAllocatedValues(t *testing.T) {}

func TestServiceDefaultOnRead(t *testing.T) {}

type cudTestCase

type svcTestCase

type svcTestProof

// Most tests will call this.
func helpTestCreateUpdateDelete(t *testing.T, testCases []cudTestCase) {}

func helpTestCreateUpdateDeleteWithFamilies(t *testing.T, testCases []cudTestCase, ipFamilies []api.IPFamily) {}

// line returns the line number of the caller, if possible.  This is useful in
// tests with a large number of cases - when something goes wrong you can find
// which case more easily.
func line() string {}

type testingTInterface

type fakeTestingT

func (f fakeTestingT) Helper() {}

func (f fakeTestingT) Errorf(format string, args ...interface{}

func verifyEquiv(t testingTInterface, call string, tc *svcTestCase, got *api.Service) bool {}

// Quis custodiet ipsos custodes?
func TestVerifyEquiv(t *testing.T) {}

func verifyExpectations(t *testing.T, storage *wrapperRESTForTests, tc svcTestCase, before, after *api.Service) {}

func callName(before, after *api.Service) string {}

func ipIsAllocated(t *testing.T, alloc ipallocator.Interface, ipstr string) bool {}

func portIsAllocated(t *testing.T, alloc portallocator.Interface, port int32) bool {}

func proveClusterIPsAllocated(t *testing.T, storage *wrapperRESTForTests, before, after *api.Service) {}

func proveClusterIPsDeallocated(t *testing.T, storage *wrapperRESTForTests, before, after *api.Service) {}

func proveHeadless(t *testing.T, storage *wrapperRESTForTests, before, after *api.Service) {}

func proveNodePortsAllocated(t *testing.T, storage *wrapperRESTForTests, before, after *api.Service) {}

func proveNodePortsDeallocated(t *testing.T, storage *wrapperRESTForTests, before, after *api.Service) {}

func proveHealthCheckNodePortAllocated(t *testing.T, storage *wrapperRESTForTests, before, after *api.Service) {}

func proveHealthCheckNodePortDeallocated(t *testing.T, storage *wrapperRESTForTests, before, after *api.Service) {}

func fmtIPFamilyPolicy(pol *api.IPFamilyPolicy) string {}

func fmtInternalTrafficPolicy(pol *api.ServiceInternalTrafficPolicy) string {}

func fmtIPFamilies(fams []api.IPFamily) string {}

// Prove that create ignores IP and IPFamily stuff when type is ExternalName.
func TestCreateIgnoresIPsForExternalName(t *testing.T) {}

// Prove that create initializes clusterIPs from clusterIP.  This simplifies
// later tests to not need to re-prove this.
func TestCreateInitClusterIPsFromClusterIP(t *testing.T) {}

// Prove that create initializes IPFamily fields correctly.
func TestCreateInitIPFields(t *testing.T) {}

// There are enough corner-cases that it's useful to have a test that asserts
// the errors.  Some of these are in other tests, but this is clearer.
func TestCreateInvalidClusterIPInputs(t *testing.T) {}

func TestCreateDeleteReuse(t *testing.T) {}

func TestCreateInitNodePorts(t *testing.T) {}

// Prove that create skips allocations for Headless services.
func TestCreateSkipsAllocationsForHeadless(t *testing.T) {}

// Prove that a dry-run create doesn't actually allocate IPs or ports.
func TestCreateDryRun(t *testing.T) {}

func TestDeleteWithFinalizer(t *testing.T) {}

// Prove that a dry-run delete doesn't actually deallocate IPs or ports.
func TestDeleteDryRun(t *testing.T) {}

// Prove that a dry-run update doesn't actually allocate or deallocate IPs or ports.
func TestUpdateDryRun(t *testing.T) {}

func TestUpdatePatchAllocatedValues(t *testing.T) {}

// Proves that updates from single-stack work.
func TestUpdateIPsFromSingleStack(t *testing.T) {}

// Proves that updates from dual-stack.
func TestUpdateIPsFromDualStack(t *testing.T) {}

func TestFeatureExternalName(t *testing.T) {}

func TestFeatureSelector(t *testing.T) {}

func TestFeatureClusterIPs(t *testing.T) {}

func TestFeaturePorts(t *testing.T) {}

func TestFeatureSessionAffinity(t *testing.T) {}

func TestFeatureType(t *testing.T) {}

func TestFeatureExternalTrafficPolicy(t *testing.T) {}

func TestFeatureInternalTrafficPolicy(t *testing.T) {}

// this is local because it's not fully fleshed out enough for general use.
func makePod(name string, ips ...string) api.Pod {}

func TestServiceRegistryResourceLocation(t *testing.T) {}

func TestUpdateServiceLoadBalancerStatus(t *testing.T) {}

func loadbalancerIPModeInUse(status api.ServiceStatus) bool {}