mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 06:27:05 +00:00
Merge pull request #111228 from Abirdcfly/220716
clean unreachable code
This commit is contained in:
commit
4e5711829c
@ -1897,7 +1897,6 @@ func compareEndpointsMapsStr(t *testing.T, newMap EndpointsMap, expected map[Ser
|
|||||||
newEp, ok := newMap[x][i].(*BaseEndpointInfo)
|
newEp, ok := newMap[x][i].(*BaseEndpointInfo)
|
||||||
if !ok {
|
if !ok {
|
||||||
t.Fatalf("Failed to cast endpointsInfo")
|
t.Fatalf("Failed to cast endpointsInfo")
|
||||||
continue
|
|
||||||
}
|
}
|
||||||
if !endpointEqual(newEp, expected[x][i]) {
|
if !endpointEqual(newEp, expected[x][i]) {
|
||||||
t.Fatalf("expected new[%v][%d] to be %v, got %v"+
|
t.Fatalf("expected new[%v][%d] to be %v, got %v"+
|
||||||
|
@ -37,9 +37,9 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
restful "github.com/emicklei/go-restful/v3"
|
"github.com/emicklei/go-restful/v3"
|
||||||
|
|
||||||
fuzzer "k8s.io/apimachinery/pkg/api/apitesting/fuzzer"
|
"k8s.io/apimachinery/pkg/api/apitesting/fuzzer"
|
||||||
apiequality "k8s.io/apimachinery/pkg/api/equality"
|
apiequality "k8s.io/apimachinery/pkg/api/equality"
|
||||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||||
"k8s.io/apimachinery/pkg/api/meta"
|
"k8s.io/apimachinery/pkg/api/meta"
|
||||||
@ -2839,7 +2839,7 @@ func TestDeleteWithOptionsQuery(t *testing.T) {
|
|||||||
t.Fatalf("unexpected error: %v", err)
|
t.Fatalf("unexpected error: %v", err)
|
||||||
}
|
}
|
||||||
if res.StatusCode != http.StatusOK {
|
if res.StatusCode != http.StatusOK {
|
||||||
t.Fatalf("unexpected response: %s %#v", request.URL, res)
|
t.Errorf("unexpected response: %s %#v", request.URL, res)
|
||||||
s, err := ioutil.ReadAll(res.Body)
|
s, err := ioutil.ReadAll(res.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("unexpected error: %v", err)
|
t.Fatalf("unexpected error: %v", err)
|
||||||
|
@ -491,8 +491,7 @@ func (c *dynamicResourceClient) Apply(ctx context.Context, name string, obj *uns
|
|||||||
if err := c.client.scheme.Convert(uncastRet, ret, nil); err != nil {
|
if err := c.client.scheme.Convert(uncastRet, ret, nil); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return ret, err
|
return ret, nil
|
||||||
return nil, nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *dynamicResourceClient) ApplyStatus(ctx context.Context, name string, obj *unstructured.Unstructured, options metav1.ApplyOptions) (*unstructured.Unstructured, error) {
|
func (c *dynamicResourceClient) ApplyStatus(ctx context.Context, name string, obj *unstructured.Unstructured, options metav1.ApplyOptions) (*unstructured.Unstructured, error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user