Skip to content

Commit

Permalink
Add MatchingLabels method to ValdK8sClientMock
Browse files Browse the repository at this point in the history
  • Loading branch information
ykadowak committed Mar 6, 2024
1 parent 8560ef1 commit e2c84c1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/test/mock/k8s/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Check warning on line 70 in internal/test/mock/k8s/client.go

View check run for this annotation

Codecov / codecov/patch

internal/test/mock/k8s/client.go#L68-L70

Added lines #L68 - L70 were not covered by tests
}

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)
Expand Down

0 comments on commit e2c84c1

Please sign in to comment.