test(gateway): restore end-to-end host browse-scope wiring coverage; strengthen snapshot summary assertion
Add GalaxyRepositoryHostWiringTests.BrowseChildren_BrowseSubtreesConstraintThroughHostWiring_FiltersChildren: constructs the real GatewayRequestIdentityAccessor + GatewayBrowseScopeProvider, passes the provider as IGalaxyBrowseScopeProvider to the lib GalaxyRepositoryGrpcService, and asserts two children (unconstrained) then empty (BrowseSubtrees=["NonExistent"]) — proving the full production authz-filtering chain is correctly wired. Strengthen DashboardSnapshotServiceTests.GetSnapshot_ProjectsGalaxySummaryFromHierarchyCache: add Assert.Equal(2, TopTemplates.Count) and Assert.Contains($Area, InstanceCount==1) so the test guards the complete summary output, not just the $Pump entry.
This commit is contained in:
@@ -272,8 +272,10 @@ public sealed class DashboardSnapshotServiceTests
|
||||
Assert.Equal(3, snapshot.Galaxy.ObjectCount);
|
||||
Assert.Equal(1, snapshot.Galaxy.AreaCount);
|
||||
Assert.Equal(2, snapshot.Galaxy.AttributeCount);
|
||||
Assert.Equal(2, snapshot.Galaxy.TopTemplates.Count);
|
||||
Assert.Equal("$Pump", Assert.Single(snapshot.Galaxy.TopTemplates, t => t.TemplateName == "$Pump").TemplateName);
|
||||
Assert.Equal(2, snapshot.Galaxy.TopTemplates.First(t => t.TemplateName == "$Pump").InstanceCount);
|
||||
Assert.Contains(snapshot.Galaxy.TopTemplates, t => t.TemplateName == "$Area" && t.InstanceCount == 1);
|
||||
Assert.Contains(snapshot.Galaxy.ObjectCategories, c => c.CategoryName == "UserDefined" && c.ObjectCount == 2);
|
||||
Assert.Contains(snapshot.Galaxy.ObjectCategories, c => c.CategoryName == "Area" && c.ObjectCount == 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user