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) { … }
func TestDiscoverySync(t *testing.T) { … }
func assertMonitors(t *testing.T, qc quotaController, resources ...string) { … }
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 …
func (f *fakeAction) String() string { … }
type FakeResponse …
type fakeActionHandler …
func (f *fakeActionHandler) ServeHTTP(response http.ResponseWriter, request *http.Request) { … }