- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for FilterPath (0.13 sec)
-
staging/src/k8s.io/apimachinery/pkg/util/diff/diff.go
// hand side of a comparison. This is useful in testing to assert that an // object is a derivative. func IgnoreUnset() cmp.Option { return cmp.Options{ // ignore unset fields in v2 cmp.FilterPath(func(path cmp.Path) bool { _, v2 := path.Last().Values() switch v2.Kind() { case reflect.Slice, reflect.Map: if v2.IsNil() || v2.Len() == 0 { return true } case reflect.String:
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 12 15:45:31 UTC 2023 - 3.4K bytes - Viewed (0) -
operator/pkg/compare/compare.go
func genYamlIgnoreOpt(yamlStr string) (cmp.Option, error) { tree := make(map[string]any) if err := yaml.Unmarshal([]byte(yamlStr), &tree); err != nil { return nil, err } return cmp.FilterPath(func(curPath cmp.Path) bool { up := pathToStringList(curPath) treeNode, found, _ := tpath.Find(tree, up) return found && IsLeafNode(treeNode) }, cmp.Ignore()), nil }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Apr 15 01:29:35 UTC 2024 - 13.3K bytes - Viewed (0) -
pkg/controller/tainteviction/taint_eviction_test.go
Type: "Normal", Count: 1, Message: "Marking for deletion Pod test/test", Source: corev1.EventSource{Component: "nodeControllerTest"}, }, } if diff := cmp.Diff(want, recorder.Events, cmp.FilterPath(f, cmp.Ignore())); len(diff) > 0 { t.Errorf("emitPodDeletionEvent() returned data (-want,+got):\n%s", diff) } }) t.Run("emitCancelPodDeletionEvent", func(t *testing.T) { controller := &Controller{}
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Apr 25 14:24:16 UTC 2024 - 31.3K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/server/options/encryptionconfig/config_test.go
} ignoredFields := sets.NewString("Transformer", "EncryptedObject.EncryptedDEKSource", "UID", "CacheKey") gotState := *h.state.Load() if diff := cmp.Diff(tt.wantState, gotState, cmp.FilterPath(func(path cmp.Path) bool { return ignoredFields.Has(path.String()) }, cmp.Ignore()), ); len(diff) > 0 { t.Errorf("state mismatch (-want +got):\n%s", diff) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu May 16 16:56:39 UTC 2024 - 72.3K bytes - Viewed (0)