diff --git a/testing/fixture_test.go b/testing/fixture_test.go index 5aab05aa..fb947f81 100644 --- a/testing/fixture_test.go +++ b/testing/fixture_test.go @@ -46,7 +46,6 @@ func getArbitraryResource(s schema.GroupVersionResource, name, namespace string) "generateName": "test_generateName", "uid": "test_uid", "resourceVersion": "test_resourceVersion", - "selfLink": "test_selfLink", }, "data": strconv.Itoa(rand.Int()), }, diff --git a/tools/events/eventseries_test.go b/tools/events/eventseries_test.go index 3fe01a29..17097aae 100644 --- a/tools/events/eventseries_test.go +++ b/tools/events/eventseries_test.go @@ -216,7 +216,6 @@ func TestFinishSeries(t *testing.T) { hostname, _ := os.Hostname() testPod := &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ - SelfLink: "/api/v1/namespaces/baz/pods/foo", Name: "foo", Namespace: "baz", UID: "bar", @@ -288,7 +287,6 @@ func TestRefreshExistingEventSeries(t *testing.T) { hostname, _ := os.Hostname() testPod := &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ - SelfLink: "/api/v1/namespaces/baz/pods/foo", Name: "foo", Namespace: "baz", UID: "bar", diff --git a/tools/record/event_test.go b/tools/record/event_test.go index f003b1d3..54435bca 100644 --- a/tools/record/event_test.go +++ b/tools/record/event_test.go @@ -129,7 +129,6 @@ func TestNonRacyShutdown(t *testing.T) { func TestEventf(t *testing.T) { testPod := &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ - SelfLink: "/api/v1/namespaces/baz/pods/foo", Name: "foo", Namespace: "baz", UID: "bar", @@ -137,7 +136,6 @@ func TestEventf(t *testing.T) { } testPod2 := &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ - SelfLink: "/api/v1/namespaces/baz/pods/foo", Name: "foo", Namespace: "baz", UID: "differentUid", @@ -554,9 +552,8 @@ func TestLotsOfEvents(t *testing.T) { func TestEventfNoNamespace(t *testing.T) { testPod := &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ - SelfLink: "/api/v1/namespaces/default/pods/foo", - Name: "foo", - UID: "bar", + Name: "foo", + UID: "bar", }, } testRef, err := ref.GetPartialReference(scheme.Scheme, testPod, "spec.containers[2]") @@ -651,7 +648,6 @@ func TestEventfNoNamespace(t *testing.T) { func TestMultiSinkCache(t *testing.T) { testPod := &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ - SelfLink: "/api/v1/namespaces/baz/pods/foo", Name: "foo", Namespace: "baz", UID: "bar", @@ -659,7 +655,6 @@ func TestMultiSinkCache(t *testing.T) { } testPod2 := &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ - SelfLink: "/api/v1/namespaces/baz/pods/foo", Name: "foo", Namespace: "baz", UID: "differentUid", diff --git a/tools/reference/ref_test.go b/tools/reference/ref_test.go index 7a478374..c7042c62 100644 --- a/tools/reference/ref_test.go +++ b/tools/reference/ref_test.go @@ -43,7 +43,7 @@ func TestGetReferenceRefVersion(t *testing.T) { { name: "v1 GV from scheme", input: &TestRuntimeObj{ - ObjectMeta: metav1.ObjectMeta{SelfLink: "/bad-selflink/unused"}, + ObjectMeta: metav1.ObjectMeta{}, }, groupVersion: schema.GroupVersion{Group: "", Version: "v1"}, expectedRefVersion: "v1", @@ -51,7 +51,7 @@ func TestGetReferenceRefVersion(t *testing.T) { { name: "foo.group/v3 GV from scheme", input: &TestRuntimeObj{ - ObjectMeta: metav1.ObjectMeta{SelfLink: "/bad-selflink/unused"}, + ObjectMeta: metav1.ObjectMeta{}, }, groupVersion: schema.GroupVersion{Group: "foo.group", Version: "v3"}, expectedRefVersion: "foo.group/v3", diff --git a/util/jsonpath/jsonpath_test.go b/util/jsonpath/jsonpath_test.go index 197e73e8..6473d259 100644 --- a/util/jsonpath/jsonpath_test.go +++ b/util/jsonpath/jsonpath_test.go @@ -793,8 +793,7 @@ func TestRunningPodsJSONPathOutput(t *testing.T) { } }, { - "resourceVersion": "", - "selfLink": "" + "resourceVersion": "" } ] }`)