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.

Kubernetes-commit: c40f9f8bbb34d9bc58dbf8e6c7f664aacb0c5b91
This commit is contained in:
Arda Güçlü 2023-02-10 11:31:19 +03:00 committed by Kubernetes Publisher
parent 2d1cd8a4fc
commit 6bb46c3def
1 changed files with 1 additions and 1 deletions

View File

@ -1665,7 +1665,7 @@ func TestCompleteAndValidate(t *testing.T) {
}
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)
}
})