diff --git a/internal/policies/fetcher.go b/internal/policies/fetcher.go index 744d28be..aa9a13dd 100644 --- a/internal/policies/fetcher.go +++ b/internal/policies/fetcher.go @@ -194,7 +194,7 @@ func (f *Fetcher) getAdmissionPolicies(namespace string) ([]policiesv1.Admission return policies.Items, nil } -func newClient() (client.Client, error) { //nolint +func newClient() (client.Client, error) { //nolint:ireturn config := ctrl.GetConfigOrDie() customScheme := scheme.Scheme customScheme.AddKnownTypes( diff --git a/internal/resources/fetcher_test.go b/internal/resources/fetcher_test.go index 0f8efb0a..001f8bdb 100644 --- a/internal/resources/fetcher_test.go +++ b/internal/resources/fetcher_test.go @@ -735,13 +735,13 @@ func TestLackOfPermsWhenGettingResources(t *testing.T) { // simulate lacking permissions when listing pods or namespaces. This should // make the filtering skip these resources, and produce no error dynamicClient.PrependReactor("list", "pods", - func(action clienttesting.Action) (handled bool, ret runtime.Object, err error) { + func(action clienttesting.Action) (bool, runtime.Object, error) { return true, nil, apimachineryerrors.NewForbidden(schema.GroupResource{ Resource: "pods", }, "", errors.New("reason")) }) dynamicClient.PrependReactor("list", "namespaces", - func(action clienttesting.Action) (handled bool, ret runtime.Object, err error) { + func(action clienttesting.Action) (bool, runtime.Object, error) { return true, nil, apimachineryerrors.NewForbidden(schema.GroupResource{ Resource: "namespaces", }, "", errors.New("reason")) @@ -767,7 +767,7 @@ func TestLackOfPermsWhenGettingResources(t *testing.T) { fakeClientSet := fakekubernetes.NewSimpleClientset() fakeClientSet.Resources = []*metav1.APIResourceList{&apiResourceList} - // the pairs policies,resources should be empty, as pods,namespaces have + // the pairs (policies,resources) should be empty, as (pods,namespaces) have // been skipped because of lack of permissions expectedP1 := []AuditableResources{}