From 3eaec6d600461228c308cb27642e02949e697314 Mon Sep 17 00:00:00 2001 From: Shash Reddy Date: Tue, 30 Apr 2019 12:11:31 -0700 Subject: [PATCH] Enable fields validation on delete actions --- reconciler/testing/table.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/reconciler/testing/table.go b/reconciler/testing/table.go index 0a0a3a9bff..e2aaf6a13c 100644 --- a/reconciler/testing/table.go +++ b/reconciler/testing/table.go @@ -264,9 +264,8 @@ func (r *TableRow) Test(t *testing.T, factory Factory) { if got, want := got.GetListRestrictions().Labels, want.GetListRestrictions().Labels; (got != nil) != (want != nil) || got.String() != want.String() { t.Errorf("Unexpected delete-collection[%d].Labels = %v, wanted %v", i, got, want) } - // TODO(mattmoor): Add this if/when we need support. - if got := got.GetListRestrictions().Fields; got.String() != "" { - t.Errorf("Unexpected delete-collection[%d].Fields = %v, wanted ''", i, got) + if got, want := got.GetListRestrictions().Fields, want.GetListRestrictions().Fields; (got != nil) != (want != nil) || got.String() != want.String() { + t.Errorf("Unexpected delete-collection[%d].Fields = %v, wanted %v", i, got, want) } if !r.SkipNamespaceValidation && got.GetNamespace() != expectedNamespace { t.Errorf("Unexpected delete-collection[%d]: %#v, wanted %s", i, got, expectedNamespace)