fix(central-ui): resolve CentralUI-006 — push-based deployment status via IDeploymentStatusNotifier, remove 10s polling timer

This commit is contained in:
Joseph Doherty
2026-05-17 00:02:45 -04:00
parent a55502254e
commit 34588ae10c
11 changed files with 459 additions and 36 deletions

View File

@@ -56,4 +56,25 @@ public class ServiceCollectionExtensionsTests
{
Assert.Equal("ScadaLink:DeploymentManager", ServiceCollectionExtensions.OptionsSection);
}
// CentralUI-006: the deployment-status notifier must be a singleton so the
// scoped DeploymentService and the Central UI's scoped Blazor page share
// one instance — without that, a push notification raised by the service
// would never reach the page's subscription.
[Fact]
public void AddDeploymentManager_RegistersDeploymentStatusNotifier_AsSingleton()
{
var services = new ServiceCollection();
services.AddLogging();
services.AddDeploymentManager();
using var provider = services.BuildServiceProvider();
var fromRoot = provider.GetRequiredService<IDeploymentStatusNotifier>();
using var scope = provider.CreateScope();
var fromScope = scope.ServiceProvider.GetRequiredService<IDeploymentStatusNotifier>();
Assert.IsType<DeploymentStatusNotifier>(fromRoot);
Assert.Same(fromRoot, fromScope);
}
}