From 8b758fb3b999e675d487158706b97f730fe1d054 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Tyczy=C5=84ski?= Date: Thu, 13 Jan 2022 11:33:26 +0100 Subject: [PATCH] Remove selflink references in api tests --- pkg/api/testing/deep_copy_test.go | 1 - pkg/api/testing/meta_test.go | 10 ---------- pkg/api/testing/node_example.json | 1 - pkg/api/testing/replication_controller_example.json | 1 - 4 files changed, 13 deletions(-) diff --git a/pkg/api/testing/deep_copy_test.go b/pkg/api/testing/deep_copy_test.go index 06dfb3bf94b..b3bb453e24a 100644 --- a/pkg/api/testing/deep_copy_test.go +++ b/pkg/api/testing/deep_copy_test.go @@ -46,7 +46,6 @@ var benchmarkPod = api.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: "etcd-server-e2e-test-wojtekt-master", Namespace: "default", - SelfLink: "/api/v1/namespaces/default/pods/etcd-server-e2e-test-wojtekt-master", UID: types.UID("a671734a-e8e5-11e4-8fde-42010af09327"), ResourceVersion: "22", CreationTimestamp: parseTimeOrDie("2015-04-22T11:49:36Z"), diff --git a/pkg/api/testing/meta_test.go b/pkg/api/testing/meta_test.go index 384ad2906f2..d59c06c983e 100644 --- a/pkg/api/testing/meta_test.go +++ b/pkg/api/testing/meta_test.go @@ -56,11 +56,6 @@ func TestAccessorImplementations(t *testing.T) { t.Errorf("%v (%v) did not preserve resource version", gv.WithKind(kind), knownType) continue } - m.SetSelfLink("102030") - if m.GetSelfLink() != "102030" { - t.Errorf("%v (%v) did not preserve self link", gv.WithKind(kind), knownType) - continue - } case isOM: m := om.GetObjectMeta() if m == nil { @@ -72,11 +67,6 @@ func TestAccessorImplementations(t *testing.T) { t.Errorf("%v (%v) did not preserve resource version", gv.WithKind(kind), knownType) continue } - m.SetSelfLink("102030") - if m.GetSelfLink() != "102030" { - t.Errorf("%v (%v) did not preserve self link", gv.WithKind(kind), knownType) - continue - } labels := map[string]string{"a": "b"} m.SetLabels(labels) if !reflect.DeepEqual(m.GetLabels(), labels) { diff --git a/pkg/api/testing/node_example.json b/pkg/api/testing/node_example.json index ea249cb7854..6e32f3d6d50 100644 --- a/pkg/api/testing/node_example.json +++ b/pkg/api/testing/node_example.json @@ -3,7 +3,6 @@ "apiVersion": "v1", "metadata": { "name": "e2e-test-wojtekt-node-etd6", - "selfLink": "/api/v1/nodes/e2e-test-wojtekt-node-etd6", "uid": "a7e89222-e8e5-11e4-8fde-42010af09327", "resourceVersion": "379", "creationTimestamp": "2015-04-22T11:49:39Z" diff --git a/pkg/api/testing/replication_controller_example.json b/pkg/api/testing/replication_controller_example.json index 8f858c023f2..18bc181a59b 100644 --- a/pkg/api/testing/replication_controller_example.json +++ b/pkg/api/testing/replication_controller_example.json @@ -4,7 +4,6 @@ "metadata": { "name": "elasticsearch-logging-controller", "namespace": "default", - "selfLink": "/api/v1/namespaces/default/replicationcontrollers/elasticsearch-logging-controller", "uid": "aa76f162-e8e5-11e4-8fde-42010af09327", "resourceVersion": "98", "creationTimestamp": "2015-04-22T11:49:43Z",