From e2c84c17718f0d5f0b98323675494f9cf9e21a36 Mon Sep 17 00:00:00 2001 From: ykadowak Date: Wed, 6 Mar 2024 07:13:49 +0000 Subject: [PATCH] Add MatchingLabels method to ValdK8sClientMock --- internal/test/mock/k8s/client.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/test/mock/k8s/client.go b/internal/test/mock/k8s/client.go index 1d51944043..b43d1e4fd1 100644 --- a/internal/test/mock/k8s/client.go +++ b/internal/test/mock/k8s/client.go @@ -65,6 +65,11 @@ func (m *ValdK8sClientMock) Watch(ctx context.Context, obj crclient.ObjectList, return args.Get(0).(watch.Interface), args.Error(1) } +func (m *ValdK8sClientMock) MatchingLabels(labels map[string]string) client.MatchingLabels { + args := m.Called(labels) + return args.Get(0).(client.MatchingLabels) +} + func (m *ValdK8sClientMock) LabelSelector(key string, op selection.Operator, vals []string) (labels.Selector, error) { args := m.Called(key, op, vals) return args.Get(0).(labels.Selector), args.Error(1)