docs(tests): fix CommentChecker findings across tests/ — 13,392 → 0 (repo-wide scan clean)
Comment/XML-doc changes only: - add summaries to ~10k test methods, fixtures, fakes and helpers (+ <param> on theories, <returns> on async Task methods, <inheritdoc/> on interface implementations the checker can resolve) - strip ~2.6k project-tracking references (WP*, P*-*, row-NN, Task N, #NN, Component-0NN) from comments, keeping the explanatory text; reword false positives in comments only - real docs on fakes implementing BCL/library interfaces (IDisposable, ILogger, IOptionsMonitor, IAsyncLifetime) - reword the last 5 src/ false positives (CWE-1236, failures-1, year-0001, M365) Only non-comment edits: four one-line nested classes split across lines so members can carry docs. Build 0 errors / 0 warnings.
This commit is contained in:
@@ -29,13 +29,14 @@ public class SiteHealthEndpointTests : IDisposable
|
||||
private readonly string _tempDbPath;
|
||||
private readonly string _tempAuditDbPath;
|
||||
|
||||
/// <summary>Initializes the test class with temporary database paths and the environment overrides a site node needs to boot.</summary>
|
||||
public SiteHealthEndpointTests()
|
||||
{
|
||||
_tempDbPath = Path.Combine(Path.GetTempPath(), $"scadabridge_health_ep_{Guid.NewGuid()}.db");
|
||||
_tempAuditDbPath = Path.Combine(Path.GetTempPath(), $"scadabridge_health_ep_audit_{Guid.NewGuid()}.db");
|
||||
|
||||
// Whole-key env overrides, the sanctioned path: supplying GrpcPsk concretely makes the
|
||||
// pre-host secrets expander skip appsettings.Site.json's ${secret:SB-GRPC-PSK-site-1}
|
||||
// pre-host secrets expander skip appsettings.Site.json's ${secret:SB-GRPC-PSK-<siteId>}
|
||||
// token, so this test needs no seeded secrets store.
|
||||
//
|
||||
// The remoting port is moved off the site default (8082) so this fixture cannot collide
|
||||
@@ -52,7 +53,7 @@ public class SiteHealthEndpointTests : IDisposable
|
||||
SetEnv("ScadaBridge__Cluster__SeedNodes__1", "akka.tcp://scadabridge@localhost:18085");
|
||||
SetEnv("ScadaBridge__Communication__GrpcPsk", "test-psk-0123456789");
|
||||
SetEnv("LocalDb__Path", _tempDbPath);
|
||||
// arch-review remediation WP1.2: SqliteAuditWriterOptions.DatabasePath has no default
|
||||
// SqliteAuditWriterOptions.DatabasePath has no default
|
||||
// and StartupValidator now requires it for Site nodes — same reason LocalDb__Path is
|
||||
// overridden above (appsettings.Site.json's own default is CWD-relative and would
|
||||
// otherwise litter the test working directory when SiteAuditBacklogReporter probes it).
|
||||
@@ -65,6 +66,7 @@ public class SiteHealthEndpointTests : IDisposable
|
||||
Environment.SetEnvironmentVariable(key, value);
|
||||
}
|
||||
|
||||
/// <summary>Releases the resources held by this test class.</summary>
|
||||
public void Dispose()
|
||||
{
|
||||
foreach (var d in _disposables)
|
||||
@@ -109,6 +111,8 @@ public class SiteHealthEndpointTests : IDisposable
|
||||
return client;
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a site node maps the ready health endpoint with the canonical JSON body.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task Site_MapsHealthReady_WithTheCanonicalJsonBody()
|
||||
{
|
||||
@@ -130,6 +134,8 @@ public class SiteHealthEndpointTests : IDisposable
|
||||
Assert.False(entries.TryGetProperty("active-node", out _), "active-node belongs to the Active tier");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a site node maps the active health endpoint carrying only the active-node check.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task Site_MapsHealthActive_CarryingOnlyTheActiveNodeCheck()
|
||||
{
|
||||
@@ -145,6 +151,8 @@ public class SiteHealthEndpointTests : IDisposable
|
||||
entries.EnumerateObject().Select(p => p.Name).ToArray());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the site health endpoints are reachable anonymously.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task Site_HealthEndpointsAreAnonymous()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user