remove selflink as per review feedback

This commit is contained in:
Harsimran Singh Maan 2022-10-17 09:19:21 -07:00
parent c8714ebd11
commit 5da368d012
No known key found for this signature in database
GPG Key ID: D152954B87883845
2 changed files with 0 additions and 6 deletions

View File

@ -388,7 +388,6 @@ func (c *dynamicResourceClient) List(ctx context.Context, opts metav1.ListOption
list := &unstructured.UnstructuredList{}
list.SetRemainingItemCount(entireList.GetRemainingItemCount())
list.SetSelfLink(entireList.GetSelfLink())
list.SetResourceVersion(entireList.GetResourceVersion())
list.SetContinue(entireList.GetContinue())
list.GetObjectKind().SetGroupVersionKind(listGVK)

View File

@ -180,7 +180,6 @@ func Test_ListKind(t *testing.T) {
"metadata": map[string]interface{}{
"continue": "",
"resourceVersion": "",
"selfLink": "",
},
},
Items: []unstructured.Unstructured{
@ -336,7 +335,6 @@ func TestListWithUnstructuredObjectsAndTypedScheme(t *testing.T) {
expectedList.SetGroupVersionKind(listGVK)
expectedList.SetResourceVersion("") // by product of the fake setting resource version
expectedList.SetContinue("")
expectedList.SetSelfLink("")
expectedList.Items = append(expectedList.Items, u)
if diff := cmp.Diff(expectedList, list); diff != "" {
@ -366,7 +364,6 @@ func TestListWithNoFixturesAndTypedScheme(t *testing.T) {
expectedList.SetGroupVersionKind(listGVK)
expectedList.SetResourceVersion("") // by product of the fake setting resource version
expectedList.SetContinue("")
expectedList.SetSelfLink("")
if diff := cmp.Diff(expectedList, list); diff != "" {
t.Fatal("unexpected diff (-want, +got): ", diff)
@ -400,7 +397,6 @@ func TestListWithNoScheme(t *testing.T) {
expectedList.SetGroupVersionKind(listGVK)
expectedList.SetResourceVersion("") // by product of the fake setting resource version
expectedList.SetContinue("")
expectedList.SetSelfLink("")
expectedList.Items = append(expectedList.Items, u)
if diff := cmp.Diff(expectedList, list); diff != "" {
@ -444,7 +440,6 @@ func TestListWithTypedFixtures(t *testing.T) {
expectedList.SetGroupVersionKind(listGVK)
expectedList.SetResourceVersion("") // by product of the fake setting resource version
expectedList.SetContinue("")
expectedList.SetSelfLink("")
expectedList.Items = []unstructured.Unstructured{u}
if diff := cmp.Diff(expectedList, list); diff != "" {