Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for ClearActions (0.13 sec)

  1. pkg/kubelet/util/manager/cache_based_manager_test.go

    	store.AddReference("ns", "name", "pod")
    	store.Get("ns", "name")
    	fakeClient.ClearActions()
    
    	// Set 0-ttl and see if that works.
    	ttl = time.Duration(0)
    	ttlExists = true
    	store.Get("ns", "name")
    	actions := fakeClient.Actions()
    	assert.Equal(t, 1, len(actions), "unexpected actions: %#v", actions)
    	fakeClient.ClearActions()
    
    	// Set 5-minute ttl and see if this works.
    	ttl = time.Duration(5) * time.Minute
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 19.6K bytes
    - Viewed (0)
  2. security/pkg/k8s/configutil_test.go

    			if tc.existingConfigMap != nil {
    				if _, err := configmaps.Create(tc.existingConfigMap); err != nil {
    					t.Errorf("failed to create configmap %v", err)
    				}
    			}
    			fake.ClearActions()
    			err := updateDataInConfigMap(configmaps, tc.existingConfigMap, []byte(caBundle))
    			if err != nil && err.Error() != tc.expectedErr {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Feb 08 21:58:25 UTC 2024
    - 13K bytes
    - Viewed (0)
  3. pkg/controller/namespace/deletion/namespaced_resources_deleter_test.go

    	// Delete ns1 and get NotFound errors for the flakes resource
    	mockMetadataClient.ClearActions()
    	if err := d.Delete(ctx, ns1.Name); err != nil {
    		t.Fatal(err)
    	}
    	if len(mockMetadataClient.Actions()) != 3 ||
    		!mockMetadataClient.Actions()[0].Matches("delete-collection", "flakes") ||
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 20 07:34:23 UTC 2023
    - 15.8K bytes
    - Viewed (0)
  4. pkg/controller/tainteviction/taint_eviction_test.go

    							expected = true
    						}
    					}
    					if !expected {
    						t.Errorf("Pod %v was deleted even though it shouldn't have", deletedPodName)
    					}
    				}
    				fakeClientset.ClearActions()
    			}
    		})
    	}
    }
    
    func TestGetMinTolerationTime(t *testing.T) {
    	one := int64(1)
    	two := int64(2)
    	oneSec := 1 * time.Second
    
    	tests := []struct {
    		tolerations []corev1.Toleration
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 14:24:16 UTC 2024
    - 31.3K bytes
    - Viewed (0)
  5. pkg/kubelet/status/status_manager_test.go

    func verifyActions(t *testing.T, manager *manager, expectedActions []core.Action) {
    	t.Helper()
    	manager.consumeUpdates()
    	actions := manager.kubeClient.(*fake.Clientset).Actions()
    	defer manager.kubeClient.(*fake.Clientset).ClearActions()
    	if len(actions) != len(expectedActions) {
    		t.Fatalf("unexpected actions: %s", cmp.Diff(expectedActions, actions))
    	}
    	for i := 0; i < len(actions); i++ {
    		e := expectedActions[i]
    		a := actions[i]
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 02 16:27:19 UTC 2024
    - 68.1K bytes
    - Viewed (0)
  6. pkg/controller/garbagecollector/garbagecollector_test.go

    			}
    			if _, err := c.CreateFake(obj, metav1.CreateOptions{}); err != nil {
    				ctx.t.Fatal(err)
    			}
    			ctx.metadataClient.ClearActions()
    		},
    	}
    }
    
    func deleteObjectFromClient(group, version, resource, namespace, name string) step {
    	return step{
    		name: "deleteObjectFromClient",
    		check: func(ctx stepContext) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 111.6K bytes
    - Viewed (0)
  7. pkg/kubelet/kubelet_test.go

    	testPod3.Namespace = "ns2"
    
    	testKubelet.fakeKubeClient = fake.NewSimpleClientset(testPod1, testPod2, testPod3)
    	kubelet.kubeClient = testKubelet.fakeKubeClient
    	defer testKubelet.fakeKubeClient.ClearActions()
    	kubelet.podManager.AddPod(testPod1)
    	kubelet.podManager.AddPod(testPod2)
    	kubelet.podManager.AddPod(testPod3)
    	kubelet.podWorkers.(*fakePodWorkers).running = map[types.UID]bool{
    		testPod1.UID: true,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 14 16:09:17 UTC 2024
    - 106.9K bytes
    - Viewed (0)
  8. pkg/kubelet/kubelet_node_status_test.go

    					Names:     []string{"registry.k8s.io:v3", "registry.k8s.io:v4"},
    					SizeBytes: 456,
    				},
    			},
    		},
    	}
    
    	checkNodeStatus := func(status v1.ConditionStatus, reason string) {
    		kubeClient.ClearActions()
    		assert.NoError(t, kubelet.updateNodeStatus(ctx))
    		actions := kubeClient.Actions()
    		require.Len(t, actions, 2)
    		require.True(t, actions[1].Matches("patch", "nodes"))
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 08 19:23:19 UTC 2024
    - 115.8K bytes
    - Viewed (0)
Back to top