Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for expectedTaints (0.18 sec)

  1. pkg/util/taints/taints_test.go

    		}
    		if !reflect.DeepEqual(newNode.Spec.Taints, c.expectedTaints) {
    			t.Errorf("[%s] the new node object should have taints %v, but got: %v", c.name, c.expectedTaints, newNode.Spec.Taints)
    		}
    	}
    }
    
    func TestDeleteTaint(t *testing.T) {
    	cases := []struct {
    		name           string
    		taints         []v1.Taint
    		taintToDelete  *v1.Taint
    		expectedTaints []v1.Taint
    		expectedResult bool
    	}{
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 16 09:23:35 UTC 2022
    - 22.6K bytes
    - Viewed (0)
  2. plugin/pkg/admission/nodetaint/admission_test.go

    		oldNode        api.Node
    		operation      admission.Operation
    		options        runtime.Object
    		expectedTaints []api.Taint
    	}{
    		{
    			name:           "notReady taint is added on creation",
    			node:           myNodeObj,
    			operation:      admission.Create,
    			options:        &metav1.CreateOptions{},
    			expectedTaints: []api.Taint{notReadyTaint},
    		},
    		{
    			name:           "already tainted node is not tainted again",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 06 04:56:21 UTC 2019
    - 3.1K bytes
    - Viewed (0)
  3. pkg/controller/controller_utils_test.go

    		node, _ = test.nodeHandler.Get(context.TODO(), test.nodeName, metav1.GetOptions{})
    		assert.EqualValues(t, test.expectedTaints, node.Spec.Taints,
    			"%s: failed to remove taint off node: expected %+v, got %+v",
    			test.name, test.expectedTaints, node.Spec.Taints)
    
    		assert.Equal(t, test.requestCount, test.nodeHandler.RequestCount,
    			"%s: unexpected request count: expected %+v, got %+v",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 39.4K bytes
    - Viewed (0)
  4. pkg/controller/nodelifecycle/node_lifecycle_controller_test.go

    		if err != nil {
    			t.Errorf("Can't get current node0...")
    			return
    		}
    		if len(node0.Spec.Taints) != len(test.ExpectedTaints) {
    			t.Errorf("%s: Unexpected number of taints: expected %d, got %d",
    				test.Name, len(test.ExpectedTaints), len(node0.Spec.Taints))
    		}
    		for _, taint := range test.ExpectedTaints {
    			if !taintutils.TaintExists(node0.Spec.Taints, taint) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 26 03:26:45 UTC 2024
    - 119K bytes
    - Viewed (0)
  5. pkg/kubelet/cm/cpumanager/topology_hints_test.go

    		if len(tc.expectedHints) == 0 && len(podHints) == 0 {
    			continue
    		}
    
    		sort.SliceStable(podHints, func(i, j int) bool {
    			return podHints[i].LessThan(podHints[j])
    		})
    		sort.SliceStable(tc.expectedHints, func(i, j int) bool {
    			return tc.expectedHints[i].LessThan(tc.expectedHints[j])
    		})
    		if !reflect.DeepEqual(tc.expectedHints, podHints) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 19K bytes
    - Viewed (0)
  6. pkg/kubelet/cm/devicemanager/topology_hints_test.go

    		for r := range tc.expectedHints {
    			sort.SliceStable(hints[r], func(i, j int) bool {
    				return hints[r][i].LessThan(hints[r][j])
    			})
    			sort.SliceStable(tc.expectedHints[r], func(i, j int) bool {
    				return tc.expectedHints[r][i].LessThan(tc.expectedHints[r][j])
    			})
    			if !reflect.DeepEqual(hints[r], tc.expectedHints[r]) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 27 13:02:15 UTC 2023
    - 47.5K bytes
    - Viewed (0)
  7. pkg/kubelet/cm/memorymanager/memory_manager_test.go

    			container := &pod.Spec.Containers[0]
    			hints := mgr.GetTopologyHints(pod, container)
    			if !reflect.DeepEqual(hints, testCase.expectedHints) {
    				t.Errorf("Hints were not generated correctly. Hints generated: %+v, hints expected: %+v",
    					hints, testCase.expectedHints)
    			}
    		})
    	}
    }
    
    func TestAllocateAndAddPodWithInitContainers(t *testing.T) {
    	testCases := []testMemoryManager{
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 05 13:01:40 UTC 2023
    - 70.2K bytes
    - Viewed (0)
Back to top