Add explicitNamespace into ignore list in debug unit tests

Since, `explicitNamespace` is set by kubeconfig automatically, we can
safely add this field into ignore list.
This commit is contained in:
Arda Güçlü 2023-02-10 11:31:19 +03:00
parent e0fedec69d
commit c40f9f8bbb

View File

@ -1665,7 +1665,7 @@ func TestCompleteAndValidate(t *testing.T) {
} }
if diff := cmp.Diff(tc.wantOpts, opts, cmpFilter, cmpopts.IgnoreFields(DebugOptions{}, if diff := cmp.Diff(tc.wantOpts, opts, cmpFilter, cmpopts.IgnoreFields(DebugOptions{},
"attachChanged", "shareProcessedChanged", "podClient", "WarningPrinter", "Applier")); diff != "" { "attachChanged", "shareProcessedChanged", "podClient", "WarningPrinter", "Applier", "explicitNamespace")); diff != "" {
t.Error("CompleteAndValidate unexpected diff in generated object: (-want +got):\n", diff) t.Error("CompleteAndValidate unexpected diff in generated object: (-want +got):\n", diff)
} }
}) })