- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for DeepDerivative (0.21 sec)
-
pkg/api/testing/conversion_test.go
if err != nil { b.Fatalf("Conversion error: %v", err) } result = obj.(*api.Node) } b.StopTimer() if !apiequality.Semantic.DeepDerivative(node, *result) { b.Fatalf("Incorrect conversion: %s", cmp.Diff(node, *result)) } } func BenchmarkReplicationControllerConversion(b *testing.B) { data, err := os.ReadFile("replication_controller_example.json")
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Oct 30 06:49:09 UTC 2021 - 3.9K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal.go
} return v1.Interface() == v2.Interface() } } // DeepDerivative is similar to DeepEqual except that unset fields in a1 are // ignored (not compared). This allows us to focus on the fields that matter to // the semantic comparison. // // The unset fields include a nil pointer and an empty string. func (e Equalities) DeepDerivative(a1, a2 interface{}) bool { if a1 == nil { return true }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jul 20 17:18:42 UTC 2022 - 10.8K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal_test.go
{[]string{}, []string{"1", "2", "3"}, true}, {[]string{"1"}, []string{"1", "2", "3"}, true}, {[]string{"1", "2", "3"}, []string{}, false}, } for _, item := range table { if e, a := item.equal, e.DeepDerivative(item.a, item.b); e != a { t.Errorf("Expected (%+v ~ %+v) == %v, but got %v", item.a, item.b, e, a) } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jul 14 18:55:26 UTC 2022 - 4.4K bytes - Viewed (0) -
staging/src/k8s.io/cli-runtime/pkg/resource/builder_test.go
if err != nil || singleItemImplied || len(test.Infos) != 4 { t.Fatalf("unexpected response: %v %t %#v", err, singleItemImplied, test.Infos) } if !apiequality.Semantic.DeepDerivative([]runtime.Object{&pods.Items[0], &pods.Items[1], &svcs.Items[0], &svcs.Items[0]}, test.Objects()) { t.Errorf("unexpected visited objects: %#v", test.Objects()) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon May 01 11:58:41 UTC 2023 - 56.1K bytes - Viewed (0) -
pkg/kubelet/config/file_linux_test.go
select { case got := <-ch: update := got.(kubetypes.PodUpdate) expected := CreatePodUpdate(kubetypes.SET, kubetypes.FileSource) if !apiequality.Semantic.DeepDerivative(expected, update) { t.Fatalf("expected %#v, Got %#v", expected, update) } case <-time.After(wait.ForeverTestTimeout): t.Fatalf("expected update, timeout instead") } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jan 14 09:38:23 UTC 2022 - 12.3K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/managedfields/internal/lastappliedmanager_test.go
if err != nil { t.Errorf("unexpected error during force ownership apply: %v", err) } } // Eventually resource should contain applied changes if !apiequality.Semantic.DeepDerivative(appliedObj, f.Live()) { t.Errorf("expected equal resource: \n%#v, got: \n%#v", appliedObj, f.Live()) } }) } } func yamlToJSON(y []byte) (string, error) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 08 21:44:00 UTC 2023 - 20K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storage/testing/watcher_tests.go
} testCheckResultFunc(t, tooOldWatcher, func(actualEvent watch.Event) { expectNoDiff(t, "incorrect event type", watch.Error, actualEvent.Type) if !apiequality.Semantic.DeepDerivative(&expiredError, actualEvent.Object) && !apiequality.Semantic.DeepDerivative(&internalError, actualEvent.Object) { t.Errorf("expected: %#v; got %#v", &expiredError, actualEvent.Object) } }) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 63.8K bytes - Viewed (0) -
pkg/controller/controller_utils_test.go
var actualPod = &v1.Pod{} err = json.Unmarshal([]byte(fakeHandler.RequestBody), actualPod) assert.NoError(t, err, "unexpected error: %v", err) assert.True(t, apiequality.Semantic.DeepDerivative(test.wantPod, actualPod), "Body: %s", fakeHandler.RequestBody) }) } } func TestDeletePodsAllowsMissing(t *testing.T) { fakeClient := fake.NewSimpleClientset() podControl := RealPodControl{
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 39.4K bytes - Viewed (0) -
pkg/controller/replicaset/replica_set_test.go
if !exists || err != nil { t.Errorf("Expected to find replica set under key %v", key) } rsSpec := *obj.(*apps.ReplicaSet) if !apiequality.Semantic.DeepDerivative(rsSpec, testRSSpec) { t.Errorf("Expected %#v, but got %#v", testRSSpec, rsSpec) } close(received) return nil } // Start only the ReplicaSet watcher and the workqueue, send a watch event,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat May 04 18:33:12 UTC 2024 - 69.2K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store_test.go
} list, err := registry.ListPredicate(ctx, item.m, nil) if err != nil { t.Fatalf("Unexpected error %v", err) } // DeepDerivative e,a is needed here b/c the storage layer sets ResourceVersion if e, a := item.out, list; !apiequality.Semantic.DeepDerivative(e, a) { t.Fatalf("%v: Expected %#v, got %#v", name, e, a) } }) } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jun 12 10:12:02 UTC 2024 - 101.8K bytes - Viewed (0)