Merge pull request #127539 from mmorel-35/testifylint/error-is-as@k8s.io/client-go

fix: enable error-is-as rule from testifylint in module `k8s.io/client-go`

Kubernetes-commit: 04ff7bd30397a12322b10294953673cca8c02db0
This commit is contained in:
Kubernetes Publisher
2024-09-28 02:52:01 +01:00
3 changed files with 4 additions and 4 deletions

2
go.mod
View File

@@ -28,7 +28,7 @@ require (
google.golang.org/protobuf v1.34.2
gopkg.in/evanphx/json-patch.v4 v4.12.0
k8s.io/api v0.0.0-20240920202009-71385f038c10
k8s.io/apimachinery v0.0.0-20240925041717-7f7bf1108918
k8s.io/apimachinery v0.0.0-20240926041705-dc03077c038e
k8s.io/klog/v2 v2.130.1
k8s.io/kube-openapi v0.0.0-20240827152857-f7e401e7b4c2
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8

4
go.sum
View File

@@ -159,8 +159,8 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
k8s.io/api v0.0.0-20240920202009-71385f038c10 h1:shjQe98Co9zBlDzQkxb5IJEWtReSl7qunr56C4Jgc70=
k8s.io/api v0.0.0-20240920202009-71385f038c10/go.mod h1:KCEt6+W/Yn1Vc48pYXeLf0mGK52kJhvt+rcaUVsIaKQ=
k8s.io/apimachinery v0.0.0-20240925041717-7f7bf1108918 h1:ng/G1Cex08Vz3thCE0X7s2vn6eHduxFOG9khssm3dwM=
k8s.io/apimachinery v0.0.0-20240925041717-7f7bf1108918/go.mod h1:5rKPDwwN9qm//xASFCZ83nyYEanHxxhc7pZ8AC4lukY=
k8s.io/apimachinery v0.0.0-20240926041705-dc03077c038e h1:/N2qUkIcQ8VaZbmy28grdhVBbNXO6KLZRdz6F2siNeY=
k8s.io/apimachinery v0.0.0-20240926041705-dc03077c038e/go.mod h1:5rKPDwwN9qm//xASFCZ83nyYEanHxxhc7pZ8AC4lukY=
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
k8s.io/kube-openapi v0.0.0-20240827152857-f7e401e7b4c2 h1:GKE9U8BH16uynoxQii0auTjmmmuZ3O0LFMN6S0lPPhI=

View File

@@ -937,7 +937,7 @@ func TestLeaderElectionConfigValidation(t *testing.T) {
lock.LockConfig = resourceLockConfig
lec.Lock = lock
_, err = NewLeaderElector(lec)
assert.Error(t, err, fmt.Errorf("Lock identity is empty"))
assert.EqualError(t, err, "Lock identity is empty")
}
func assertEqualEvents(t *testing.T, expected []string, actual <-chan string) {