clean Unreachable code

Signed-off-by: Abirdcfly <fp544037857@gmail.com>
This commit is contained in:
Abirdcfly 2022-07-19 00:58:17 +08:00
parent 5108b0a3a0
commit f71718d644
3 changed files with 4 additions and 6 deletions

View File

@ -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"+

View File

@ -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)

View File

@ -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) {