Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for AddReactor (0.53 sec)

  1. plugin/pkg/admission/namespace/exists/admission_test.go

    // newMockClientForTest creates a mock client that returns a client configured for the specified list of namespaces.
    func newMockClientForTest(namespaces []string) *fake.Clientset {
    	mockClient := &fake.Clientset{}
    	mockClient.AddReactor("list", "namespaces", func(action core.Action) (bool, runtime.Object, error) {
    		namespaceList := &corev1.NamespaceList{
    			ListMeta: metav1.ListMeta{
    				ResourceVersion: fmt.Sprintf("%d", len(namespaces)),
    			},
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 06 00:00:21 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  2. plugin/pkg/admission/namespace/autoprovision/admission_test.go

    // newMockClientForTest creates a mock client that returns a client configured for the specified list of namespaces.
    func newMockClientForTest(namespaces []string) *fake.Clientset {
    	mockClient := &fake.Clientset{}
    	mockClient.AddReactor("list", "namespaces", func(action core.Action) (bool, runtime.Object, error) {
    		namespaceList := &corev1.NamespaceList{
    			ListMeta: metav1.ListMeta{
    				ResourceVersion: fmt.Sprintf("%d", len(namespaces)),
    			},
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 06 00:00:21 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  3. pkg/controller/volume/expand/expand_controller_test.go

    			return volumetypes.NewOperationContext(nil, nil, false)
    		})
    
    		if test.pv != nil {
    			fakeKubeClient.AddReactor("get", "persistentvolumes", func(action coretesting.Action) (bool, runtime.Object, error) {
    				return true, test.pv, nil
    			})
    		}
    		fakeKubeClient.AddReactor("patch", "persistentvolumeclaims", func(action coretesting.Action) (bool, runtime.Object, error) {
    			if action.GetSubresource() == "status" {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 18 11:00:37 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/admission/plugin/resourcequota/resource_access_test.go

    	accessor, _ := newQuotaAccessor()
    	accessor.client = kubeClient
    	accessor.lister = informerFactory.Core().V1().ResourceQuotas().Lister()
    
    	kubeClient.AddReactor("list", "resourcequotas", func(action core.Action) (bool, runtime.Object, error) {
    		switch action.GetNamespace() {
    		case testNamespace1:
    			atomic.AddInt64(&listCallCountTestNamespace1, 1)
    		case testNamespace2:
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 10 13:54:56 UTC 2024
    - 7.2K bytes
    - Viewed (0)
Back to top