Fix Galaxy paging review findings

This commit is contained in:
Joseph Doherty
2026-04-29 11:59:49 -04:00
parent d543679044
commit ac2787f619
14 changed files with 261 additions and 22 deletions
@@ -24,7 +24,7 @@ public sealed class GalaxyRepositoryGrpcServiceTests
Assert.Equal(2, reply.Objects.Count);
Assert.Equal("Object_001", reply.Objects[0].TagName);
Assert.Equal("Object_002", reply.Objects[1].TagName);
Assert.Equal("2", reply.NextPageToken);
Assert.Equal("7:2", reply.NextPageToken);
Assert.Equal(3, reply.TotalObjectCount);
}
@@ -37,7 +37,7 @@ public sealed class GalaxyRepositoryGrpcServiceTests
new DiscoverHierarchyRequest
{
PageSize = 2,
PageToken = "2",
PageToken = "7:2",
},
new TestServerCallContext());
@@ -50,7 +50,8 @@ public sealed class GalaxyRepositoryGrpcServiceTests
[Theory]
[InlineData("-1", 1)]
[InlineData("not-an-offset", 1)]
[InlineData("4", 1)]
[InlineData("7:4", 1)]
[InlineData("6:2", 1)]
[InlineData("", -1)]
public async Task DiscoverHierarchy_WithInvalidPagingArguments_ReturnsInvalidArgument(
string pageToken,
@@ -88,6 +89,7 @@ public sealed class GalaxyRepositoryGrpcServiceTests
return GalaxyHierarchyCacheEntry.Empty with
{
Status = GalaxyCacheStatus.Healthy,
Sequence = 7,
LastSuccessAt = DateTimeOffset.UtcNow,
Objects = objects,
DashboardSummary = DashboardGalaxySummary.Unknown with