Make ListMeta.RemainingItemCount a pointer (*int64) to make sure it's omitted
when serialized to proto. The SetRemainingItemCount() and GetRemainingItemCount() still takes and returns an int64 to make developers life easier. Kubernetes-commit: e28a1072d94d947f38db7abc4c66426b8f057b17
This commit is contained in:
parent
b7773567c0
commit
bba40a550f
|
@ -67,7 +67,7 @@ func (c defaultTableConvertor) ConvertToTable(ctx context.Context, object runtim
|
|||
table.ResourceVersion = m.GetResourceVersion()
|
||||
table.SelfLink = m.GetSelfLink()
|
||||
table.Continue = m.GetContinue()
|
||||
table.RemainingItemCount = m.GetRemainingItemCount()
|
||||
table.SetRemainingItemCount(m.GetRemainingItemCount())
|
||||
} else {
|
||||
if m, err := meta.CommonAccessor(object); err == nil {
|
||||
table.ResourceVersion = m.GetResourceVersion()
|
||||
|
|
|
@ -1062,7 +1062,7 @@ func TestList(t *testing.T) {
|
|||
t.Errorf("(%s): length of list want=%d, got=%d", tt.name, len(tt.expectedOut), len(out.Items))
|
||||
continue
|
||||
}
|
||||
if e, a := tt.expectedRemainingItemCount, out.ListMeta.RemainingItemCount; e != a {
|
||||
if e, a := tt.expectedRemainingItemCount, out.ListMeta.GetRemainingItemCount(); e != a {
|
||||
t.Errorf("(%s): remainingItemCount want=%d, got=%d", tt.name, e, a)
|
||||
}
|
||||
for j, wantPod := range tt.expectedOut {
|
||||
|
|
Loading…
Reference in New Issue