mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #81944 from carlory/fix-vendor
fix static check failures in staging pkg
This commit is contained in:
commit
84d484bd2c
@ -202,7 +202,6 @@ vendor/k8s.io/apiserver/pkg/util/wsstream
|
||||
vendor/k8s.io/apiserver/plugin/pkg/authenticator/token/oidc
|
||||
vendor/k8s.io/apiserver/plugin/pkg/authenticator/token/webhook
|
||||
vendor/k8s.io/apiserver/plugin/pkg/authorizer/webhook
|
||||
vendor/k8s.io/cli-runtime/pkg/resource
|
||||
vendor/k8s.io/client-go/discovery/cached/memory
|
||||
vendor/k8s.io/client-go/dynamic/fake
|
||||
vendor/k8s.io/client-go/metadata/fake
|
||||
@ -212,7 +211,6 @@ vendor/k8s.io/client-go/restmapper
|
||||
vendor/k8s.io/client-go/tools/cache
|
||||
vendor/k8s.io/client-go/tools/leaderelection
|
||||
vendor/k8s.io/client-go/transport
|
||||
vendor/k8s.io/cloud-provider/service/helpers
|
||||
vendor/k8s.io/code-generator/cmd/client-gen/generators/fake
|
||||
vendor/k8s.io/code-generator/cmd/client-gen/generators/util
|
||||
vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf
|
||||
@ -235,4 +233,3 @@ vendor/k8s.io/kubectl/pkg/scale
|
||||
vendor/k8s.io/legacy-cloud-providers/aws
|
||||
vendor/k8s.io/legacy-cloud-providers/azure
|
||||
vendor/k8s.io/metrics/pkg/client/custom_metrics
|
||||
vendor/k8s.io/sample-controller
|
||||
|
@ -54,9 +54,8 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
corev1GV = schema.GroupVersion{Version: "v1"}
|
||||
corev1Codec = scheme.Codecs.CodecForVersions(scheme.Codecs.LegacyCodec(corev1GV), scheme.Codecs.UniversalDecoder(corev1GV), corev1GV, corev1GV)
|
||||
metaAccessor = meta.NewAccessor()
|
||||
corev1GV = schema.GroupVersion{Version: "v1"}
|
||||
corev1Codec = scheme.Codecs.CodecForVersions(scheme.Codecs.LegacyCodec(corev1GV), scheme.Codecs.UniversalDecoder(corev1GV), corev1GV, corev1GV)
|
||||
)
|
||||
|
||||
func stringBody(body string) io.ReadCloser {
|
||||
|
@ -44,8 +44,8 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
constSTDINstr string = "STDIN"
|
||||
stopValidateMessage = "if you choose to ignore these errors, turn validation off with --validate=false"
|
||||
constSTDINstr = "STDIN"
|
||||
stopValidateMessage = "if you choose to ignore these errors, turn validation off with --validate=false"
|
||||
)
|
||||
|
||||
// Watchable describes a resource that can be watched for changes that occur on the server,
|
||||
|
@ -59,13 +59,13 @@ func TestGetLoadBalancerSourceRanges(t *testing.T) {
|
||||
annotations[v1.AnnotationLoadBalancerSourceRangesKey] = v
|
||||
svc := v1.Service{}
|
||||
svc.Annotations = annotations
|
||||
cidrs, err := GetLoadBalancerSourceRanges(&svc)
|
||||
_, err := GetLoadBalancerSourceRanges(&svc)
|
||||
if err != nil {
|
||||
t.Errorf("Unexpected error parsing: %q", v)
|
||||
}
|
||||
svc = v1.Service{}
|
||||
svc.Spec.LoadBalancerSourceRanges = strings.Split(v, ",")
|
||||
cidrs, err = GetLoadBalancerSourceRanges(&svc)
|
||||
cidrs, err := GetLoadBalancerSourceRanges(&svc)
|
||||
if err != nil {
|
||||
t.Errorf("Unexpected error parsing: %q", v)
|
||||
}
|
||||
|
@ -175,8 +175,8 @@ func checkAction(expected, actual core.Action, t *testing.T) {
|
||||
}
|
||||
|
||||
switch a := actual.(type) {
|
||||
case core.CreateAction:
|
||||
e, _ := expected.(core.CreateAction)
|
||||
case core.CreateActionImpl:
|
||||
e, _ := expected.(core.CreateActionImpl)
|
||||
expObject := e.GetObject()
|
||||
object := a.GetObject()
|
||||
|
||||
@ -184,8 +184,8 @@ func checkAction(expected, actual core.Action, t *testing.T) {
|
||||
t.Errorf("Action %s %s has wrong object\nDiff:\n %s",
|
||||
a.GetVerb(), a.GetResource().Resource, diff.ObjectGoPrintSideBySide(expObject, object))
|
||||
}
|
||||
case core.UpdateAction:
|
||||
e, _ := expected.(core.UpdateAction)
|
||||
case core.UpdateActionImpl:
|
||||
e, _ := expected.(core.UpdateActionImpl)
|
||||
expObject := e.GetObject()
|
||||
object := a.GetObject()
|
||||
|
||||
@ -193,8 +193,8 @@ func checkAction(expected, actual core.Action, t *testing.T) {
|
||||
t.Errorf("Action %s %s has wrong object\nDiff:\n %s",
|
||||
a.GetVerb(), a.GetResource().Resource, diff.ObjectGoPrintSideBySide(expObject, object))
|
||||
}
|
||||
case core.PatchAction:
|
||||
e, _ := expected.(core.PatchAction)
|
||||
case core.PatchActionImpl:
|
||||
e, _ := expected.(core.PatchActionImpl)
|
||||
expPatch := e.GetPatch()
|
||||
patch := a.GetPatch()
|
||||
|
||||
@ -202,6 +202,9 @@ func checkAction(expected, actual core.Action, t *testing.T) {
|
||||
t.Errorf("Action %s %s has wrong patch\nDiff:\n %s",
|
||||
a.GetVerb(), a.GetResource().Resource, diff.ObjectGoPrintSideBySide(expPatch, patch))
|
||||
}
|
||||
default:
|
||||
t.Errorf("Uncaptured Action %s %s, you should explicitly add a case to capture it",
|
||||
actual.GetVerb(), actual.GetResource().Resource)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user