mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
remove selflink as per review feedback
This commit is contained in:
parent
c8714ebd11
commit
5da368d012
@ -388,7 +388,6 @@ func (c *dynamicResourceClient) List(ctx context.Context, opts metav1.ListOption
|
|||||||
|
|
||||||
list := &unstructured.UnstructuredList{}
|
list := &unstructured.UnstructuredList{}
|
||||||
list.SetRemainingItemCount(entireList.GetRemainingItemCount())
|
list.SetRemainingItemCount(entireList.GetRemainingItemCount())
|
||||||
list.SetSelfLink(entireList.GetSelfLink())
|
|
||||||
list.SetResourceVersion(entireList.GetResourceVersion())
|
list.SetResourceVersion(entireList.GetResourceVersion())
|
||||||
list.SetContinue(entireList.GetContinue())
|
list.SetContinue(entireList.GetContinue())
|
||||||
list.GetObjectKind().SetGroupVersionKind(listGVK)
|
list.GetObjectKind().SetGroupVersionKind(listGVK)
|
||||||
|
@ -180,7 +180,6 @@ func Test_ListKind(t *testing.T) {
|
|||||||
"metadata": map[string]interface{}{
|
"metadata": map[string]interface{}{
|
||||||
"continue": "",
|
"continue": "",
|
||||||
"resourceVersion": "",
|
"resourceVersion": "",
|
||||||
"selfLink": "",
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Items: []unstructured.Unstructured{
|
Items: []unstructured.Unstructured{
|
||||||
@ -336,7 +335,6 @@ func TestListWithUnstructuredObjectsAndTypedScheme(t *testing.T) {
|
|||||||
expectedList.SetGroupVersionKind(listGVK)
|
expectedList.SetGroupVersionKind(listGVK)
|
||||||
expectedList.SetResourceVersion("") // by product of the fake setting resource version
|
expectedList.SetResourceVersion("") // by product of the fake setting resource version
|
||||||
expectedList.SetContinue("")
|
expectedList.SetContinue("")
|
||||||
expectedList.SetSelfLink("")
|
|
||||||
expectedList.Items = append(expectedList.Items, u)
|
expectedList.Items = append(expectedList.Items, u)
|
||||||
|
|
||||||
if diff := cmp.Diff(expectedList, list); diff != "" {
|
if diff := cmp.Diff(expectedList, list); diff != "" {
|
||||||
@ -366,7 +364,6 @@ func TestListWithNoFixturesAndTypedScheme(t *testing.T) {
|
|||||||
expectedList.SetGroupVersionKind(listGVK)
|
expectedList.SetGroupVersionKind(listGVK)
|
||||||
expectedList.SetResourceVersion("") // by product of the fake setting resource version
|
expectedList.SetResourceVersion("") // by product of the fake setting resource version
|
||||||
expectedList.SetContinue("")
|
expectedList.SetContinue("")
|
||||||
expectedList.SetSelfLink("")
|
|
||||||
|
|
||||||
if diff := cmp.Diff(expectedList, list); diff != "" {
|
if diff := cmp.Diff(expectedList, list); diff != "" {
|
||||||
t.Fatal("unexpected diff (-want, +got): ", diff)
|
t.Fatal("unexpected diff (-want, +got): ", diff)
|
||||||
@ -400,7 +397,6 @@ func TestListWithNoScheme(t *testing.T) {
|
|||||||
expectedList.SetGroupVersionKind(listGVK)
|
expectedList.SetGroupVersionKind(listGVK)
|
||||||
expectedList.SetResourceVersion("") // by product of the fake setting resource version
|
expectedList.SetResourceVersion("") // by product of the fake setting resource version
|
||||||
expectedList.SetContinue("")
|
expectedList.SetContinue("")
|
||||||
expectedList.SetSelfLink("")
|
|
||||||
expectedList.Items = append(expectedList.Items, u)
|
expectedList.Items = append(expectedList.Items, u)
|
||||||
|
|
||||||
if diff := cmp.Diff(expectedList, list); diff != "" {
|
if diff := cmp.Diff(expectedList, list); diff != "" {
|
||||||
@ -444,7 +440,6 @@ func TestListWithTypedFixtures(t *testing.T) {
|
|||||||
expectedList.SetGroupVersionKind(listGVK)
|
expectedList.SetGroupVersionKind(listGVK)
|
||||||
expectedList.SetResourceVersion("") // by product of the fake setting resource version
|
expectedList.SetResourceVersion("") // by product of the fake setting resource version
|
||||||
expectedList.SetContinue("")
|
expectedList.SetContinue("")
|
||||||
expectedList.SetSelfLink("")
|
|
||||||
expectedList.Items = []unstructured.Unstructured{u}
|
expectedList.Items = []unstructured.Unstructured{u}
|
||||||
|
|
||||||
if diff := cmp.Diff(expectedList, list); diff != "" {
|
if diff := cmp.Diff(expectedList, list); diff != "" {
|
||||||
|
Loading…
Reference in New Issue
Block a user