Skip to content

Commit

Permalink
apiserver/storage: storagetesting.RunTestList validates RemainingItem…
Browse files Browse the repository at this point in the history
…Count
  • Loading branch information
p0lyn0mial committed Jun 27, 2024
1 parent 4b2fafc commit f9b1570
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"sync"
"testing"

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

0 comments on commit f9b1570

Please sign in to comment.