Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 51 for deepCopy (0.14 sec)

  1. pkg/scheduler/framework/plugins/dynamicresources/dynamicresources_test.go

    	claim = claim.DeepCopy()
    	claim.Spec.ParametersRef.APIGroup = "example.com"
    	return claim
    }
    
    // classWithCRD replaces the in-tree group with "example.com".
    func classWithCRD(class *resourcev1alpha2.ResourceClass) *resourcev1alpha2.ResourceClass {
    	class = class.DeepCopy()
    	class.ParametersRef.APIGroup = "example.com"
    	return class
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 27 07:57:10 UTC 2024
    - 61.9K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/api/resource/quantity_test.go

    	for _, item := range table {
    		a, b := item.a.DeepCopy(), item.b.DeepCopy()
    		a.AsDec()
    		if cmp := a.Cmp(b); cmp != item.cmp {
    			t.Errorf("%#v: unexpected Cmp: %d", item, cmp)
    		}
    		if cmp := b.Cmp(a); cmp != -item.cmp {
    			t.Errorf("%#v: unexpected inverted Cmp: %d", item, cmp)
    		}
    	}
    
    	for _, item := range table {
    		a, b := item.a.DeepCopy(), item.b.DeepCopy()
    		b.AsDec()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:10 UTC 2024
    - 49.4K bytes
    - Viewed (0)
  3. tests/integration/ambient/baseline_test.go

    				}
    			}
    			t.NewSubTest("simple deny").Run(func(t framework.TestContext) {
    				opt = opt.DeepCopy()
    				opt.HTTP.Path = "/deny"
    				opt.Check = CheckDeny
    				overrideCheck(&opt)
    				src.CallOrFail(t, opt)
    			})
    			t.NewSubTest("simple allow").Run(func(t framework.TestContext) {
    				opt = opt.DeepCopy()
    				opt.HTTP.Path = "/allowed"
    				opt.Check = check.OK()
    				overrideCheck(&opt)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Jun 12 00:07:28 UTC 2024
    - 78.4K bytes
    - Viewed (0)
  4. pilot/pkg/serviceregistry/serviceregistry_test.go

    			Port:    80,
    		}}
    		expectServiceEndpoints(t, fx, expectedSvc, 80, instances)
    
    		fx.Clear()
    		// Update the port
    		newWorkloadEntry := workloadEntry.DeepCopy()
    		spec := workloadEntry.Spec.(*networking.WorkloadEntry).DeepCopy()
    		spec.Ports = map[string]uint32{
    			"http": 1234,
    		}
    		newWorkloadEntry.Spec = spec
    		makeIstioObject(t, store, newWorkloadEntry)
    		instances = []EndpointResponse{{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 51.2K bytes
    - Viewed (0)
  5. pilot/pkg/model/virtualservice_test.go

    			assert.Equal(t, got, tc.expectedVirtualServices)
    		})
    	}
    
    	t.Run("test merge order", func(t *testing.T) {
    		root := rootVs.DeepCopy()
    		delegate := delegateVs.DeepCopy()
    		normal := independentVs.DeepCopy()
    
    		// make sorting results predictable.
    		t0 := time.Now()
    		root.CreationTimestamp = t0.Add(1)
    		delegate.CreationTimestamp = t0.Add(2)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Apr 21 17:42:54 UTC 2024
    - 60.6K bytes
    - Viewed (0)
  6. pilot/pkg/serviceregistry/serviceentry/controller_test.go

    	httpStaticOverlayUpdatedNop := func() *config.Config {
    		return ptr.Of(httpStaticOverlayUpdated.DeepCopy())
    	}()
    
    	// httpStaticOverlayUpdatedNs is the same as httpStaticOverlay but with an extra endpoint and different namespace added to test updates
    	httpStaticOverlayUpdatedNs := func() *config.Config {
    		c := httpStaticOverlay.DeepCopy()
    		c.Namespace = "other"
    		se := c.Spec.(*networking.ServiceEntry)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 29 15:31:09 UTC 2024
    - 92.9K bytes
    - Viewed (0)
  7. pkg/kubelet/nodestatus/setters_test.go

    			node: withCapacity.DeepCopy(),
    			cmStatus: cm.Status{
    				SoftRequirements: fmt.Errorf("foo"),
    			},
    			expectConditions: []v1.NodeCondition{*makeReadyCondition(true, "kubelet is posting ready status. WARNING: foo", now, now)},
    		},
    		{
    			desc:             "new, not ready: storage errors",
    			node:             withCapacity.DeepCopy(),
    			storageErrors:    errors.New("some storage error"),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 21:47:24 UTC 2024
    - 76.1K bytes
    - Viewed (0)
  8. pkg/controller/endpointslice/endpointslice_controller_test.go

    	require.Len(t, eventsBuilders, 1)
    	assert.Contains(t, eventsBuilders[0].Message, topologycache.InsufficientNodeInfo)
    
    	updateNode1 := node1.DeepCopy()
    	updateNode1.Labels = map[string]string{v1.LabelTopologyZone: "zone-a"}
    	updateNode2 := node2.DeepCopy()
    	updateNode2.Labels = map[string]string{v1.LabelTopologyZone: "zone-b"}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 08:33:32 UTC 2024
    - 65.5K bytes
    - Viewed (0)
  9. pkg/apis/networking/validation/validation_test.go

    							}},
    						},
    					},
    				}}
    			},
    		},
    	}
    
    	for name, testCase := range testCases {
    		t.Run(name, func(t *testing.T) {
    			newIngress := baseIngress.DeepCopy()
    			oldIngress := baseIngress.DeepCopy()
    			testCase.tweakIngresses(newIngress, oldIngress)
    
    			errs := ValidateIngressUpdate(newIngress, oldIngress)
    
    			if len(errs) != len(testCase.expectedErrs) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 31 21:05:06 UTC 2023
    - 73.3K bytes
    - Viewed (0)
  10. pkg/scheduler/framework/plugins/volumebinding/binder_test.go

    	}
    	return c
    }
    
    func makeBinding(pvc *v1.PersistentVolumeClaim, pv *v1.PersistentVolume) *BindingInfo {
    	return &BindingInfo{pvc: pvc.DeepCopy(), pv: pv.DeepCopy()}
    }
    
    func addProvisionAnn(pvc *v1.PersistentVolumeClaim) *v1.PersistentVolumeClaim {
    	res := pvc.DeepCopy()
    	// Add provision related annotations
    	metav1.SetMetaDataAnnotation(&res.ObjectMeta, volume.AnnSelectedNode, nodeLabelValue)
    
    	return res
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 09:46:58 UTC 2024
    - 82.8K bytes
    - Viewed (0)
Back to top