mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-25 14:42:33 +00:00
published by bot
(https://github.com/kubernetes/contrib/tree/master/mungegithub) copied from https://github.com/kubernetes/kubernetes.git, branch master, last commit is 914402281b80c60cc901cf1ca223f42c2bc34cf7
This commit is contained in:
@@ -50,6 +50,7 @@ import (
|
||||
"k8s.io/client-go/util/clock"
|
||||
"k8s.io/client-go/util/flowcontrol"
|
||||
utiltesting "k8s.io/client-go/util/testing"
|
||||
apiequality "k8s.io/apimachinery/pkg/api/equality"
|
||||
|
||||
_ "k8s.io/client-go/pkg/api/install"
|
||||
)
|
||||
@@ -415,7 +416,7 @@ func TestTransformResponse(t *testing.T) {
|
||||
if test.ErrFn != nil && !test.ErrFn(err) {
|
||||
t.Errorf("%d: error function did not match: %v", i, err)
|
||||
}
|
||||
if !(test.Data == nil && response == nil) && !api.Semantic.DeepDerivative(test.Data, response) {
|
||||
if !(test.Data == nil && response == nil) && !apiequality.Semantic.DeepDerivative(test.Data, response) {
|
||||
t.Errorf("%d: unexpected response: %#v %#v", i, test.Data, response)
|
||||
}
|
||||
if test.Created != created {
|
||||
@@ -1043,7 +1044,7 @@ func TestDoRequestNewWay(t *testing.T) {
|
||||
}
|
||||
if obj == nil {
|
||||
t.Error("nil obj")
|
||||
} else if !api.Semantic.DeepDerivative(expectedObj, obj) {
|
||||
} else if !apiequality.Semantic.DeepDerivative(expectedObj, obj) {
|
||||
t.Errorf("Expected: %#v, got %#v", expectedObj, obj)
|
||||
}
|
||||
requestURL := defaultResourcePathWithPrefix("foo/bar", "", "", "baz")
|
||||
@@ -1276,7 +1277,7 @@ func TestDoRequestNewWayReader(t *testing.T) {
|
||||
}
|
||||
if obj == nil {
|
||||
t.Error("nil obj")
|
||||
} else if !api.Semantic.DeepDerivative(expectedObj, obj) {
|
||||
} else if !apiequality.Semantic.DeepDerivative(expectedObj, obj) {
|
||||
t.Errorf("Expected: %#v, got %#v", expectedObj, obj)
|
||||
}
|
||||
tmpStr := string(reqBodyExpected)
|
||||
@@ -1316,7 +1317,7 @@ func TestDoRequestNewWayObj(t *testing.T) {
|
||||
}
|
||||
if obj == nil {
|
||||
t.Error("nil obj")
|
||||
} else if !api.Semantic.DeepDerivative(expectedObj, obj) {
|
||||
} else if !apiequality.Semantic.DeepDerivative(expectedObj, obj) {
|
||||
t.Errorf("Expected: %#v, got %#v", expectedObj, obj)
|
||||
}
|
||||
tmpStr := string(reqBodyExpected)
|
||||
@@ -1370,7 +1371,7 @@ func TestDoRequestNewWayFile(t *testing.T) {
|
||||
}
|
||||
if obj == nil {
|
||||
t.Error("nil obj")
|
||||
} else if !api.Semantic.DeepDerivative(expectedObj, obj) {
|
||||
} else if !apiequality.Semantic.DeepDerivative(expectedObj, obj) {
|
||||
t.Errorf("Expected: %#v, got %#v", expectedObj, obj)
|
||||
}
|
||||
if wasCreated {
|
||||
@@ -1415,7 +1416,7 @@ func TestWasCreated(t *testing.T) {
|
||||
}
|
||||
if obj == nil {
|
||||
t.Error("nil obj")
|
||||
} else if !api.Semantic.DeepDerivative(expectedObj, obj) {
|
||||
} else if !apiequality.Semantic.DeepDerivative(expectedObj, obj) {
|
||||
t.Errorf("Expected: %#v, got %#v", expectedObj, obj)
|
||||
}
|
||||
if !wasCreated {
|
||||
@@ -1623,7 +1624,7 @@ func TestWatch(t *testing.T) {
|
||||
if e, a := item.t, got.Type; e != a {
|
||||
t.Errorf("Expected %v, got %v", e, a)
|
||||
}
|
||||
if e, a := item.obj, got.Object; !api.Semantic.DeepDerivative(e, a) {
|
||||
if e, a := item.obj, got.Object; !apiequality.Semantic.DeepDerivative(e, a) {
|
||||
t.Errorf("Expected %v, got %v", e, a)
|
||||
}
|
||||
}
|
||||
|
@@ -30,6 +30,7 @@ import (
|
||||
"k8s.io/client-go/pkg/api"
|
||||
"k8s.io/client-go/pkg/api/v1"
|
||||
restclientwatch "k8s.io/client-go/rest/watch"
|
||||
apiequality "k8s.io/apimachinery/pkg/api/equality"
|
||||
|
||||
_ "k8s.io/client-go/pkg/api/install"
|
||||
)
|
||||
@@ -68,7 +69,7 @@ func TestDecoder(t *testing.T) {
|
||||
if e, a := eventType, action; e != a {
|
||||
t.Errorf("Expected %v, got %v", e, a)
|
||||
}
|
||||
if e, a := expect, got; !api.Semantic.DeepDerivative(e, a) {
|
||||
if e, a := expect, got; !apiequality.Semantic.DeepDerivative(e, a) {
|
||||
t.Errorf("Expected %v, got %v", e, a)
|
||||
}
|
||||
t.Logf("Exited read")
|
||||
|
@@ -21,6 +21,7 @@ import (
|
||||
"io/ioutil"
|
||||
"testing"
|
||||
|
||||
apiequality "k8s.io/apimachinery/pkg/api/equality"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/serializer/streaming"
|
||||
@@ -71,7 +72,7 @@ func TestEncodeDecodeRoundTrip(t *testing.T) {
|
||||
t.Errorf("%d: unexpected error: %v", i, err)
|
||||
continue
|
||||
}
|
||||
if !api.Semantic.DeepDerivative(testCase.Object, obj) {
|
||||
if !apiequality.Semantic.DeepDerivative(testCase.Object, obj) {
|
||||
t.Errorf("%d: expected %#v, got %#v", i, testCase.Object, obj)
|
||||
}
|
||||
if event != testCase.Type {
|
||||
|
Reference in New Issue
Block a user