- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for YAMLCmp (0.08 sec)
-
operator/pkg/compare/compare.go
if len(r.diffTree) == 0 { return "" } y, err := yaml.Marshal(r.diffTree) if err != nil { return err.Error() } return string(y) } // YAMLCmp compares two yaml texts, return a tree based diff text. func YAMLCmp(a, b string) string { return YAMLCmpWithIgnore(a, b, nil, "") } // YAMLCmpWithIgnore compares two yaml texts, and ignores paths in ignorePaths.
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Apr 15 01:29:35 UTC 2024 - 13.3K bytes - Viewed (0) -
operator/pkg/compare/compare_test.go
labels: '[3->?]': label4 -> <empty> (REMOVED) '[4->?]': label5 -> <empty> (REMOVED) `, }, } for _, tt := range tests { t.Run(tt.desc, func(t *testing.T) { if got, want := YAMLCmp(tt.a, tt.b), tt.want; !(got == want) { t.Errorf("%s: got:%v, want:%v", tt.desc, got, want) } }) } } func TestYAMLCmpWithIgnore(t *testing.T) { tests := []struct { desc string
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Dec 21 02:18:20 UTC 2022 - 33K bytes - Viewed (0) -
operator/cmd/mesh/manifest-generate_test.go
got, err = compare.FilterManifest(got, diffSelect, "") if err != nil { t.Errorf("error selecting from output manifest: %v", err) } diff := compare.YAMLCmp(got, want) if diff != "" { t.Errorf("`manifest generate` diff = %s", diff) } } func TestBareSpec(t *testing.T) { inPathBase := filepath.Join(testDataDir, "input/bare_spec.yaml")
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Jun 04 18:05:06 UTC 2024 - 43.5K bytes - Viewed (0)