client-go testing: start ResourceVersion at 1 for empty set

List should never return "0", that has a special meaning in queries.

Kubernetes-commit: 3783a720e7278466859fe140d2bfbbfb054f5313
This commit is contained in:
Patrick Ohly 2026-01-14 12:19:32 +01:00 committed by Kubernetes Publisher
parent 3a767404cb
commit efa6958ce8

View file

@ -51,7 +51,7 @@ func TestGetPodList(t *testing.T) {
sortBy: func(pods []*corev1.Pod) sort.Interface { return podutils.ByLogging(pods) },
expected: &corev1.PodList{
ListMeta: metav1.ListMeta{
ResourceVersion: "2", // Two objects created.
ResourceVersion: "3", // Two objects created, initial value is 1.
},
Items: []corev1.Pod{
{