- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 189 for newobj (0.14 sec)
-
pkg/registry/resource/resourceclassparameters/strategy_test.go
ctx := genericapirequest.NewDefaultContext() resourceClassParameters := resourceClassParameters.DeepCopy() newObj := resourceClassParameters.DeepCopy() newObj.Name += "-2" newObj.ResourceVersion = "4" Strategy.PrepareForUpdate(ctx, newObj, resourceClassParameters) errs := Strategy.ValidateUpdate(ctx, newObj, resourceClassParameters) if len(errs) == 0 { t.Errorf("expected a validation error") } })
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Mar 07 15:15:31 UTC 2024 - 2.5K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/equality.go
// if the non-managed parts of the object are equivalent func IgnoreManagedFieldsTimestampsTransformer( _ context.Context, newObj runtime.Object, oldObj runtime.Object, ) (res runtime.Object, err error) { equalities := getAvoidTimestampEqualities() if len(equalities.Equalities) == 0 { return newObj, nil } outcome := "unequal_objects_fast" start := time.Now() err = nil res = nil defer func() {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Sep 28 14:56:34 UTC 2022 - 5.3K bytes - Viewed (0) -
plugin/pkg/admission/gc/gc_admission_test.go
resource schema.GroupVersionResource subresource string oldObj runtime.Object newObj runtime.Object checkError func(error) bool }{ { name: "super-user, create, no objectref change", username: "super", resource: api.SchemeGroupVersion.WithResource("pods"), newObj: &api.Pod{}, checkError: expectNoError, }, {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Apr 29 21:28:42 UTC 2024 - 24.5K bytes - Viewed (0) -
pkg/scheduler/util/assumecache/assume_cache_test.go
verify(ktesting.WithStep(tCtx, "after nop add"), cache, key, newObj, newObj) informer.add(nil) verify(ktesting.WithStep(tCtx, "after nil add"), cache, key, newObj, newObj) informer.update(oldObj) verify(ktesting.WithStep(tCtx, "after nop update"), cache, key, newObj, newObj) informer.update(nil) verify(ktesting.WithStep(tCtx, "after nil update"), cache, key, newObj, newObj) informer.delete(nil)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Apr 25 09:46:58 UTC 2024 - 9.5K bytes - Viewed (0) -
pkg/scheduler/framework/plugins/nodeunschedulable/node_unschedulable_test.go
pod *v1.Pod oldObj, newObj interface{} expectedHint framework.QueueingHint expectedErr bool }{ { name: "backoff-wrong-new-object", pod: &v1.Pod{}, newObj: "not-a-node", expectedHint: framework.Queue, expectedErr: true, }, { name: "backoff-wrong-old-object", pod: &v1.Pod{}, newObj: &v1.Node{ Spec: v1.NodeSpec{
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Dec 16 12:50:11 UTC 2023 - 4.3K bytes - Viewed (0) -
pkg/registry/networking/servicecidr/strategy_test.go
newObj := &networking.ServiceCIDR{ Spec: networking.ServiceCIDRSpec{ CIDRs: []string{"10.10.0.0/16"}, }, } StatusStrategy.PrepareForUpdate(context.TODO(), newObj, oldObj) if !reflect.DeepEqual(newObj.Spec, networking.ServiceCIDRSpec{}) { t.Errorf("Expected spec field to be preserved from old object during status update") } newObj = &networking.ServiceCIDR{
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jan 04 15:09:29 UTC 2024 - 2.8K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/managedfields/internal/fieldmanager.go
// object. func (f *FieldManager) Update(liveObj, newObj runtime.Object, manager string) (object runtime.Object, err error) { // First try to decode the managed fields provided in the update, // This is necessary to allow directly updating managed fields. isSubresource := f.subresource != "" managed, err := decodeLiveOrNew(liveObj, newObj, isSubresource) if err != nil { return newObj, nil } RemoveObjectManagedFields(newObj)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue May 16 20:03:48 UTC 2023 - 7.2K bytes - Viewed (0) -
pkg/quota/v1/install/update_filter.go
func DefaultUpdateFilter() func(resource schema.GroupVersionResource, oldObj, newObj interface{}) bool { return func(resource schema.GroupVersionResource, oldObj, newObj interface{}) bool { switch resource.GroupResource() { case schema.GroupResource{Resource: "pods"}: oldPod := oldObj.(*v1.Pod) newPod := newObj.(*v1.Pod) return core.QuotaV1Pod(oldPod, clock.RealClock{}) && !core.QuotaV1Pod(newPod, clock.RealClock{})
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jul 08 22:39:55 UTC 2022 - 1.7K bytes - Viewed (0) -
pkg/registry/resource/resourceclaimparameters/strategy_test.go
ctx := genericapirequest.NewDefaultContext() resourceClaimParameters := resourceClaimParameters.DeepCopy() newObj := resourceClaimParameters.DeepCopy() newObj.Name += "-2" newObj.ResourceVersion = "4" Strategy.PrepareForUpdate(ctx, newObj, resourceClaimParameters) errs := Strategy.ValidateUpdate(ctx, newObj, resourceClaimParameters) if len(errs) == 0 { t.Errorf("expected a validation error") } })
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Mar 07 15:15:31 UTC 2024 - 2.5K bytes - Viewed (0) -
pkg/registry/core/persistentvolume/strategy_test.go
defer func() { NowFunc = metav1.Now }() tests := []struct { name string fg bool newObj *api.PersistentVolume expectedObj *api.PersistentVolume }{ { name: "feature enabled: pv is in pending phase and has a timestamp", fg: true, newObj: &api.PersistentVolume{ ObjectMeta: metav1.ObjectMeta{ Name: "foo", }, },
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 11K bytes - Viewed (0)