kubernetes/pkg/controller/resourcequota/resource_quota_controller_test.go

func getResourceList(cpu, memory string) v1.ResourceList {}

func getResourceRequirements(requests, limits v1.ResourceList) v1.ResourceRequirements {}

func mockDiscoveryFunc() ([]*metav1.APIResourceList, error) {}

func mockListerForResourceFunc(listersForResource map[schema.GroupVersionResource]cache.GenericLister) quota.ListerForResourceFunc {}

func newGenericLister(groupResource schema.GroupResource, items []runtime.Object) cache.GenericLister {}

func newErrorLister() cache.GenericLister {}

type errorLister

func (errorLister) List(selector labels.Selector) (ret []runtime.Object, err error) {}

func (errorLister) Get(name string) (runtime.Object, error) {}

func (errorLister) ByNamespace(namespace string) cache.GenericNamespaceLister {}

type quotaController

func setupQuotaController(t *testing.T, kubeClient kubernetes.Interface, lister quota.ListerForResourceFunc, discoveryFunc NamespacedResourcesFunc) quotaController {}

func newTestPods() []runtime.Object {}

func newBestEffortTestPods() []runtime.Object {}

func newTestPodsWithPriorityClasses() []runtime.Object {}

func TestSyncResourceQuota(t *testing.T) {}

func TestAddQuota(t *testing.T) {}

// TestDiscoverySync ensures that a discovery client error
// will not cause the quota controller to block infinitely.
func TestDiscoverySync(t *testing.T) {}

func assertMonitors(t *testing.T, qc quotaController, resources ...string) {}

// testServerAndClientConfig returns a server that listens and a config that can reference it
func testServerAndClientConfig(handler func(http.ResponseWriter, *http.Request)) (*httptest.Server, *rest.Config) {}

func expectSyncNotBlocked(fakeDiscoveryClient *fakeServerResources, workerLock *sync.RWMutex) error {}

type fakeServerResources

func (*fakeServerResources) ServerResourcesForGroupVersion(groupVersion string) (*metav1.APIResourceList, error) {}

func (*fakeServerResources) ServerPreferredResources() ([]*metav1.APIResourceList, error) {}

func (f *fakeServerResources) setPreferredResources(resources []*metav1.APIResourceList, err error) {}

func (f *fakeServerResources) getInterfaceUsedCount() int {}

func (f *fakeServerResources) ServerPreferredNamespacedResources() ([]*metav1.APIResourceList, error) {}

type fakeAction

// String returns method=path to aid in testing
func (f *fakeAction) String() string {}

type FakeResponse

type fakeActionHandler

// ServeHTTP logs the action that occurred and always returns the associated status code
func (f *fakeActionHandler) ServeHTTP(response http.ResponseWriter, request *http.Request) {}