Skip to content

Commit f9b1570

Browse files
committed
apiserver/storage: storagetesting.RunTestList validates RemainingItemCount
1 parent 4b2fafc commit f9b1570

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

staging/src/k8s.io/apiserver/pkg/storage/testing/store_tests.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import (
2828
"sync"
2929
"testing"
3030

31+
"github.com/google/go-cmp/cmp"
3132
apierrors "k8s.io/apimachinery/pkg/api/errors"
3233
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
3334
"k8s.io/apimachinery/pkg/fields"
@@ -1246,6 +1247,9 @@ func RunTestList(ctx context.Context, t *testing.T, store storage.Interface, com
12461247
} else {
12471248
ExpectContains(t, "incorrect list pods", toInterfaceSlice(tt.expectedAlternatives), out.Items)
12481249
}
1250+
if !cmp.Equal(tt.expectedRemainingItemCount, out.RemainingItemCount) {
1251+
t.Fatalf("unexpected remainingItemCount, diff: %s", cmp.Diff(tt.expectedRemainingItemCount, out.RemainingItemCount))
1252+
}
12491253
})
12501254
}
12511255
}

0 commit comments

Comments
 (0)