From 51b0e374acc3e57b3c91f6d9f6fe0d94cb6f7a04 Mon Sep 17 00:00:00 2001 From: Alan Parra Date: Mon, 11 Nov 2024 12:13:48 -0300 Subject: [PATCH] chore: Bump golangci-lint to v1.62.0 (#48748) * chore: Bump golangci-lint to v1.62.0 * Use require.NoError instead of require.Empty --- build.assets/versions.mk | 2 +- lib/integrations/awsoidc/eks_enroll_clusters_test.go | 6 +++--- lib/services/local/access_list_test.go | 2 +- lib/services/role_test.go | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build.assets/versions.mk b/build.assets/versions.mk index 9e6ee436c254a..a340bd94d2a1d 100644 --- a/build.assets/versions.mk +++ b/build.assets/versions.mk @@ -4,7 +4,7 @@ # Sync with devbox.json. GOLANG_VERSION ?= go1.23.3 -GOLANGCI_LINT_VERSION ?= v1.61.0 +GOLANGCI_LINT_VERSION ?= v1.62.0 NODE_VERSION ?= 20.18.0 diff --git a/lib/integrations/awsoidc/eks_enroll_clusters_test.go b/lib/integrations/awsoidc/eks_enroll_clusters_test.go index ab05516d4cbd0..14257f7056162 100644 --- a/lib/integrations/awsoidc/eks_enroll_clusters_test.go +++ b/lib/integrations/awsoidc/eks_enroll_clusters_test.go @@ -169,7 +169,7 @@ func TestEnrollEKSClusters(t *testing.T) { responseCheck: func(t *testing.T, response *EnrollEKSClusterResponse) { require.Len(t, response.Results, 1) require.Equal(t, "EKS1", response.Results[0].ClusterName) - require.Empty(t, response.Results[0].Error) + require.NoError(t, response.Results[0].Error) require.NotEmpty(t, response.Results[0].ResourceId) }, }, @@ -185,10 +185,10 @@ func TestEnrollEKSClusters(t *testing.T) { return strings.Compare(a.ClusterName, b.ClusterName) }) require.Equal(t, "EKS1", response.Results[0].ClusterName) - require.Empty(t, response.Results[0].Error) + require.NoError(t, response.Results[0].Error) require.NotEmpty(t, response.Results[0].ResourceId) require.Equal(t, "EKS2", response.Results[1].ClusterName) - require.Empty(t, response.Results[1].Error) + require.NoError(t, response.Results[1].Error) require.NotEmpty(t, response.Results[1].ResourceId) }, }, diff --git a/lib/services/local/access_list_test.go b/lib/services/local/access_list_test.go index c0a41478fbb61..97bcdd5eb44ae 100644 --- a/lib/services/local/access_list_test.go +++ b/lib/services/local/access_list_test.go @@ -842,7 +842,7 @@ func TestAccessListReviewCRUD(t *testing.T) { // Verify that access lists reviews are gone. _, _, err = service.ListAccessListReviews(ctx, accessList1.GetName(), 0, "") - require.Empty(t, err) + require.NoError(t, err) } func TestAccessListRequiresEqual(t *testing.T) { diff --git a/lib/services/role_test.go b/lib/services/role_test.go index 8d6d529bf678d..e2b651d37994f 100644 --- a/lib/services/role_test.go +++ b/lib/services/role_test.go @@ -1125,7 +1125,7 @@ func TestValidateRole(t *testing.T) { require.NoError(t, err, trace.DebugReport(err)) if len(tc.expectWarnings) == 0 { - require.Empty(t, warning) + require.NoError(t, warning) } for _, msg := range tc.expectWarnings { require.ErrorContains(t, warning, msg)