Throwing error instead of silently ignoring invalid input

This commit is contained in:
m-Bilal
2022-01-01 21:52:37 +05:30
parent b28f1e55b7
commit ff7b2f20d5
4 changed files with 22 additions and 11 deletions

View File

@@ -566,7 +566,10 @@ func TestSubsetThatCouldBeReferencedByResource(t *testing.T) {
for name, test := range tests {
test := test
t.Run(name, func(t *testing.T) {
got := m.SubsetThatCouldBeReferencedByResource(test.filter)
got, err1 := m.SubsetThatCouldBeReferencedByResource(test.filter)
if err1 != nil {
t.Fatalf("Expected error %v: ", err1)
}
err := test.expected.ErrorIfNotEqualLists(got)
if err != nil {
test.expected.Debug("expected")