mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-28 16:07:29 +00:00
Remove selflink references in different testing-related files
Kubernetes-commit: 551790729f1d26d75c1d3fa1411e341eb367f9f3
This commit is contained in:
parent
092b54e6e5
commit
a806c6e4fd
@ -46,7 +46,6 @@ func getArbitraryResource(s schema.GroupVersionResource, name, namespace string)
|
|||||||
"generateName": "test_generateName",
|
"generateName": "test_generateName",
|
||||||
"uid": "test_uid",
|
"uid": "test_uid",
|
||||||
"resourceVersion": "test_resourceVersion",
|
"resourceVersion": "test_resourceVersion",
|
||||||
"selfLink": "test_selfLink",
|
|
||||||
},
|
},
|
||||||
"data": strconv.Itoa(rand.Int()),
|
"data": strconv.Itoa(rand.Int()),
|
||||||
},
|
},
|
||||||
|
@ -216,7 +216,6 @@ func TestFinishSeries(t *testing.T) {
|
|||||||
hostname, _ := os.Hostname()
|
hostname, _ := os.Hostname()
|
||||||
testPod := &v1.Pod{
|
testPod := &v1.Pod{
|
||||||
ObjectMeta: metav1.ObjectMeta{
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
SelfLink: "/api/v1/namespaces/baz/pods/foo",
|
|
||||||
Name: "foo",
|
Name: "foo",
|
||||||
Namespace: "baz",
|
Namespace: "baz",
|
||||||
UID: "bar",
|
UID: "bar",
|
||||||
@ -288,7 +287,6 @@ func TestRefreshExistingEventSeries(t *testing.T) {
|
|||||||
hostname, _ := os.Hostname()
|
hostname, _ := os.Hostname()
|
||||||
testPod := &v1.Pod{
|
testPod := &v1.Pod{
|
||||||
ObjectMeta: metav1.ObjectMeta{
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
SelfLink: "/api/v1/namespaces/baz/pods/foo",
|
|
||||||
Name: "foo",
|
Name: "foo",
|
||||||
Namespace: "baz",
|
Namespace: "baz",
|
||||||
UID: "bar",
|
UID: "bar",
|
||||||
|
@ -129,7 +129,6 @@ func TestNonRacyShutdown(t *testing.T) {
|
|||||||
func TestEventf(t *testing.T) {
|
func TestEventf(t *testing.T) {
|
||||||
testPod := &v1.Pod{
|
testPod := &v1.Pod{
|
||||||
ObjectMeta: metav1.ObjectMeta{
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
SelfLink: "/api/v1/namespaces/baz/pods/foo",
|
|
||||||
Name: "foo",
|
Name: "foo",
|
||||||
Namespace: "baz",
|
Namespace: "baz",
|
||||||
UID: "bar",
|
UID: "bar",
|
||||||
@ -137,7 +136,6 @@ func TestEventf(t *testing.T) {
|
|||||||
}
|
}
|
||||||
testPod2 := &v1.Pod{
|
testPod2 := &v1.Pod{
|
||||||
ObjectMeta: metav1.ObjectMeta{
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
SelfLink: "/api/v1/namespaces/baz/pods/foo",
|
|
||||||
Name: "foo",
|
Name: "foo",
|
||||||
Namespace: "baz",
|
Namespace: "baz",
|
||||||
UID: "differentUid",
|
UID: "differentUid",
|
||||||
@ -554,9 +552,8 @@ func TestLotsOfEvents(t *testing.T) {
|
|||||||
func TestEventfNoNamespace(t *testing.T) {
|
func TestEventfNoNamespace(t *testing.T) {
|
||||||
testPod := &v1.Pod{
|
testPod := &v1.Pod{
|
||||||
ObjectMeta: metav1.ObjectMeta{
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
SelfLink: "/api/v1/namespaces/default/pods/foo",
|
Name: "foo",
|
||||||
Name: "foo",
|
UID: "bar",
|
||||||
UID: "bar",
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
testRef, err := ref.GetPartialReference(scheme.Scheme, testPod, "spec.containers[2]")
|
testRef, err := ref.GetPartialReference(scheme.Scheme, testPod, "spec.containers[2]")
|
||||||
@ -651,7 +648,6 @@ func TestEventfNoNamespace(t *testing.T) {
|
|||||||
func TestMultiSinkCache(t *testing.T) {
|
func TestMultiSinkCache(t *testing.T) {
|
||||||
testPod := &v1.Pod{
|
testPod := &v1.Pod{
|
||||||
ObjectMeta: metav1.ObjectMeta{
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
SelfLink: "/api/v1/namespaces/baz/pods/foo",
|
|
||||||
Name: "foo",
|
Name: "foo",
|
||||||
Namespace: "baz",
|
Namespace: "baz",
|
||||||
UID: "bar",
|
UID: "bar",
|
||||||
@ -659,7 +655,6 @@ func TestMultiSinkCache(t *testing.T) {
|
|||||||
}
|
}
|
||||||
testPod2 := &v1.Pod{
|
testPod2 := &v1.Pod{
|
||||||
ObjectMeta: metav1.ObjectMeta{
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
SelfLink: "/api/v1/namespaces/baz/pods/foo",
|
|
||||||
Name: "foo",
|
Name: "foo",
|
||||||
Namespace: "baz",
|
Namespace: "baz",
|
||||||
UID: "differentUid",
|
UID: "differentUid",
|
||||||
|
@ -43,7 +43,7 @@ func TestGetReferenceRefVersion(t *testing.T) {
|
|||||||
{
|
{
|
||||||
name: "v1 GV from scheme",
|
name: "v1 GV from scheme",
|
||||||
input: &TestRuntimeObj{
|
input: &TestRuntimeObj{
|
||||||
ObjectMeta: metav1.ObjectMeta{SelfLink: "/bad-selflink/unused"},
|
ObjectMeta: metav1.ObjectMeta{},
|
||||||
},
|
},
|
||||||
groupVersion: schema.GroupVersion{Group: "", Version: "v1"},
|
groupVersion: schema.GroupVersion{Group: "", Version: "v1"},
|
||||||
expectedRefVersion: "v1",
|
expectedRefVersion: "v1",
|
||||||
@ -51,7 +51,7 @@ func TestGetReferenceRefVersion(t *testing.T) {
|
|||||||
{
|
{
|
||||||
name: "foo.group/v3 GV from scheme",
|
name: "foo.group/v3 GV from scheme",
|
||||||
input: &TestRuntimeObj{
|
input: &TestRuntimeObj{
|
||||||
ObjectMeta: metav1.ObjectMeta{SelfLink: "/bad-selflink/unused"},
|
ObjectMeta: metav1.ObjectMeta{},
|
||||||
},
|
},
|
||||||
groupVersion: schema.GroupVersion{Group: "foo.group", Version: "v3"},
|
groupVersion: schema.GroupVersion{Group: "foo.group", Version: "v3"},
|
||||||
expectedRefVersion: "foo.group/v3",
|
expectedRefVersion: "foo.group/v3",
|
||||||
|
@ -793,8 +793,7 @@ func TestRunningPodsJSONPathOutput(t *testing.T) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"resourceVersion": "",
|
"resourceVersion": ""
|
||||||
"selfLink": ""
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}`)
|
}`)
|
||||||
|
Loading…
Reference in New Issue
Block a user