mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
clean Unreachable code
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
This commit is contained in:
parent
5108b0a3a0
commit
f71718d644
@ -1897,7 +1897,6 @@ func compareEndpointsMapsStr(t *testing.T, newMap EndpointsMap, expected map[Ser
|
||||
newEp, ok := newMap[x][i].(*BaseEndpointInfo)
|
||||
if !ok {
|
||||
t.Fatalf("Failed to cast endpointsInfo")
|
||||
continue
|
||||
}
|
||||
if !endpointEqual(newEp, expected[x][i]) {
|
||||
t.Fatalf("expected new[%v][%d] to be %v, got %v"+
|
||||
|
@ -37,9 +37,9 @@ import (
|
||||
"testing"
|
||||
"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"
|
||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/api/meta"
|
||||
@ -2839,7 +2839,7 @@ func TestDeleteWithOptionsQuery(t *testing.T) {
|
||||
t.Fatalf("unexpected error: %v", err)
|
||||
}
|
||||
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)
|
||||
if err != nil {
|
||||
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 {
|
||||
return nil, err
|
||||
}
|
||||
return ret, err
|
||||
return nil, nil
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
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