diff --git a/go.mod b/go.mod index 4e9b59f8..721fc8cf 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( golang.org/x/time v0.3.0 google.golang.org/protobuf v1.30.0 k8s.io/api v0.0.0-20230502053112-cdff1d4efea5 - k8s.io/apimachinery v0.0.0-20230502013411-c11b0f21a18f + k8s.io/apimachinery v0.0.0-20230502170225-db7f55599f0e k8s.io/klog/v2 v2.90.1 k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f k8s.io/utils v0.0.0-20230209194617-a36077c30491 @@ -60,5 +60,5 @@ require ( replace ( k8s.io/api => k8s.io/api v0.0.0-20230502053112-cdff1d4efea5 - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20230502013411-c11b0f21a18f + k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20230502170225-db7f55599f0e ) diff --git a/go.sum b/go.sum index 84634960..535ae671 100644 --- a/go.sum +++ b/go.sum @@ -480,8 +480,8 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.0.0-20230502053112-cdff1d4efea5 h1:AAFiq+OLQqeMCf6esHsifDHaYsFfvBJhTg6jd27vevM= k8s.io/api v0.0.0-20230502053112-cdff1d4efea5/go.mod h1:nfd0ttnXD79Rj548Bl1hfHBh9J38Is9kBvnnhBtdHQc= -k8s.io/apimachinery v0.0.0-20230502013411-c11b0f21a18f h1:mO0WE9xlbKiSIYzK7L9SIOkq9s9tLZDZIrLLzXQt3kU= -k8s.io/apimachinery v0.0.0-20230502013411-c11b0f21a18f/go.mod h1:D/d0HgOLmg6/40zRBT8Tzb0OSoysLc8CBtPty5QmjEM= +k8s.io/apimachinery v0.0.0-20230502170225-db7f55599f0e h1:IRz3WDUSgheN7mj2QnMRqvhGYR9i0Zv3ErJSyZNrUXk= +k8s.io/apimachinery v0.0.0-20230502170225-db7f55599f0e/go.mod h1:D/d0HgOLmg6/40zRBT8Tzb0OSoysLc8CBtPty5QmjEM= k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5FJ2kxm1WrQFanWchyKuqGg= diff --git a/tools/clientcmd/validation_test.go b/tools/clientcmd/validation_test.go index 7b8e2fd5..3c56498a 100644 --- a/tools/clientcmd/validation_test.go +++ b/tools/clientcmd/validation_test.go @@ -748,37 +748,31 @@ func TestErrConfigurationInvalidWithErrorsIs(t *testing.T) { err error matchAgainst error expectMatch bool - }{ - { - name: "no match", - err: errConfigurationInvalid{errors.New("my-error"), errors.New("my-other-error")}, - matchAgainst: fmt.Errorf("no entry %s", "here"), - }, - { - name: "match via .Is()", - err: errConfigurationInvalid{errors.New("forbidden"), alwaysMatchingError{}}, - matchAgainst: errors.New("unauthorized"), - expectMatch: true, - }, - { - name: "match via equality", - err: errConfigurationInvalid{errors.New("err"), someError{}}, - matchAgainst: someError{}, - expectMatch: true, - }, - { - name: "match via nested aggregate", - err: errConfigurationInvalid{errors.New("closed today"), errConfigurationInvalid{errConfigurationInvalid{someError{}}}}, - matchAgainst: someError{}, - expectMatch: true, - }, - { - name: "match via wrapped aggregate", - err: fmt.Errorf("wrap: %w", errConfigurationInvalid{errors.New("err"), someError{}}), - matchAgainst: someError{}, - expectMatch: true, - }, - } + }{{ + name: "no match", + err: errConfigurationInvalid{errors.New("my-error"), errors.New("my-other-error")}, + matchAgainst: fmt.Errorf("no entry %s", "here"), + }, { + name: "match via .Is()", + err: errConfigurationInvalid{errors.New("forbidden"), alwaysMatchingError{}}, + matchAgainst: errors.New("unauthorized"), + expectMatch: true, + }, { + name: "match via equality", + err: errConfigurationInvalid{errors.New("err"), someError{}}, + matchAgainst: someError{}, + expectMatch: true, + }, { + name: "match via nested aggregate", + err: errConfigurationInvalid{errors.New("closed today"), errConfigurationInvalid{errConfigurationInvalid{someError{}}}}, + matchAgainst: someError{}, + expectMatch: true, + }, { + name: "match via wrapped aggregate", + err: fmt.Errorf("wrap: %w", errConfigurationInvalid{errors.New("err"), someError{}}), + matchAgainst: someError{}, + expectMatch: true, + }} for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) {