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:
@@ -9,10 +9,10 @@ namespace ZB.MOM.WW.ScadaBridge.Host.Tests;
|
||||
/// <summary>
|
||||
/// DI-resolution tests for <see cref="SecretsRegistration.AddScadaBridgeSecrets"/>.
|
||||
/// <para>
|
||||
/// Task 11 retired every secrets REPLICATION mode in ScadaBridge — the pull-only gRPC hub (central
|
||||
/// Every secrets REPLICATION mode is retired in ScadaBridge — the pull-only gRPC hub (central
|
||||
/// hosts, sites sweep) and the SQL-Server <c>ReplicatingSecretStore</c> mode that preceded it — on
|
||||
/// BOTH roles. What is left: the plain local SQLite store, which is every node's default and now a
|
||||
/// Site's ONLY possible shape, and the still-supported Task 5
|
||||
/// Site's ONLY possible shape, and the still-supported
|
||||
/// <see cref="SecretsRegistration.StoreProviderKey"/>=SqlServer direct shared store (Central-only,
|
||||
/// no hub, no follower sweep — just two nodes reading and writing one database).
|
||||
/// </para>
|
||||
@@ -92,12 +92,13 @@ public class SecretsReplicationWiringTests
|
||||
|
||||
// ---------------------------------------------------------------------------------------
|
||||
// Site: the ONLY shape left, on every configuration — plain local SQLite, never a
|
||||
// replication decorator (Task 11, ruling #1). DeployedSecretsMirror deletes a name from
|
||||
// replication decorator. DeployedSecretsMirror deletes a name from
|
||||
// this store directly the moment a deploy artifact stops referencing it; a decorator would
|
||||
// publish that delete to every other node sharing whatever it decorates against, turning
|
||||
// one site's unreferencing of a secret into a fleet-wide deletion.
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
/// <summary>Verifies that a site resolves the plain SQLite secret store and never a replication decorator.</summary>
|
||||
[Fact]
|
||||
public void Site_ResolvesPlainSqliteStore_NeverAReplicationDecorator()
|
||||
{
|
||||
@@ -110,6 +111,7 @@ public class SecretsReplicationWiringTests
|
||||
Assert.IsType<SqliteSecretStore>(store);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a site ignores the store provider setting even when it is set to SqlServer.</summary>
|
||||
[Fact]
|
||||
public void Site_IgnoresStoreProvider_EvenSetToSqlServer()
|
||||
{
|
||||
@@ -123,6 +125,7 @@ public class SecretsReplicationWiringTests
|
||||
Assert.IsType<SqliteSecretStore>(provider.GetRequiredService<ISecretStore>());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the site container holds no SQL Server secret-store package types.</summary>
|
||||
[Fact]
|
||||
public void Site_HasNoSqlServerPackageTypesInTheContainer()
|
||||
{
|
||||
@@ -145,6 +148,7 @@ public class SecretsReplicationWiringTests
|
||||
// Central, default — plain local SQLite, the shape every existing deployment is in.
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
/// <summary>Verifies that central defaults to the plain SQLite secret store.</summary>
|
||||
[Fact]
|
||||
public void Central_DefaultsToPlainSqliteStore()
|
||||
{
|
||||
@@ -153,6 +157,7 @@ public class SecretsReplicationWiringTests
|
||||
Assert.IsType<SqliteSecretStore>(provider.GetRequiredService<ISecretStore>());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that setting the store provider to Sqlite behaves the same as leaving it unset on central.</summary>
|
||||
[Fact]
|
||||
public void Central_StoreProviderSqlite_IsIndistinguishableFromUnset()
|
||||
{
|
||||
@@ -166,10 +171,11 @@ public class SecretsReplicationWiringTests
|
||||
|
||||
// ---------------------------------------------------------------------------------------
|
||||
// Secrets:Store:Provider=SqlServer — a clustered central sharing ONE SQL secret store
|
||||
// directly, without a hub (task 5). The one replication-adjacent feature Task 11 left
|
||||
// directly, without a hub. The one replication-adjacent feature that was left
|
||||
// standing, because it is a plain shared database, not a converging replica set.
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
/// <summary>Verifies that central uses the shared SQL store when the provider is SqlServer.</summary>
|
||||
[Fact]
|
||||
public void Central_StoreProviderSqlServer_UsesSharedSqlStore()
|
||||
{
|
||||
@@ -182,6 +188,7 @@ public class SecretsReplicationWiringTests
|
||||
Assert.IsType<SqlServerSecretStore>(provider.GetRequiredService<ISecretStore>());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that central throws when the provider is SqlServer and the connection string is blank.</summary>
|
||||
[Fact]
|
||||
public void Central_StoreProviderSqlServer_BlankConnectionString_Throws()
|
||||
{
|
||||
@@ -228,7 +235,7 @@ public class SecretsReplicationWiringTests
|
||||
|
||||
// ---------------------------------------------------------------------------------------
|
||||
// The Layer-A pre-host ${secret:} expander (SecretsRegistration.AddPreHostExpander, called
|
||||
// from Program.cs) — review round 1, Important #1. It MUST compose against the SAME store
|
||||
// from Program.cs). It MUST compose against the SAME store
|
||||
// AddScadaBridgeSecrets registers for the running node: an expander that resolved boot-time
|
||||
// ${secret:} tokens (e.g. ScadaBridge:Security:JwtSigningKey) from the per-node SQLite file
|
||||
// while the running node served the shared SQL store would let two central nodes disagree on
|
||||
@@ -236,6 +243,7 @@ public class SecretsReplicationWiringTests
|
||||
// UsesCentralSharedStore is the single predicate shared by both methods.
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
/// <summary>Verifies that the shared-store check is true only for central with the SqlServer provider.</summary>
|
||||
[Fact]
|
||||
public void UsesCentralSharedStore_TrueOnlyForCentralWithProviderSqlServer()
|
||||
{
|
||||
@@ -250,6 +258,7 @@ public class SecretsReplicationWiringTests
|
||||
SecretsRegistration.UsesCentralSharedStore(sqliteConfig, SecretsNodeRole.Central));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the central pre-host expander resolves the shared SQL store when the provider is SqlServer.</summary>
|
||||
[Fact]
|
||||
public void ExpanderCentral_StoreProviderSqlServer_ResolvesSharedSqlStore()
|
||||
{
|
||||
@@ -273,6 +282,7 @@ public class SecretsReplicationWiringTests
|
||||
Assert.NotNull(provider.GetRequiredService<ISecretsStoreMigrator>());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the central pre-host expander resolves the SQLite store by default.</summary>
|
||||
[Fact]
|
||||
public void ExpanderCentral_Default_ResolvesSqliteStore()
|
||||
{
|
||||
@@ -286,6 +296,7 @@ public class SecretsReplicationWiringTests
|
||||
Assert.NotNull(provider.GetRequiredService<ISecretsStoreMigrator>());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the site pre-host expander still resolves the SQLite store when the provider is SqlServer.</summary>
|
||||
[Fact]
|
||||
public void ExpanderSite_StoreProviderSqlServer_StillResolvesSqliteStore()
|
||||
{
|
||||
@@ -304,6 +315,7 @@ public class SecretsReplicationWiringTests
|
||||
Assert.IsType<SqliteSecretStore>(provider.GetRequiredService<ISecretStore>());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the central pre-host expander throws when the provider is SqlServer and the connection string is blank.</summary>
|
||||
[Fact]
|
||||
public void ExpanderCentral_StoreProviderSqlServer_BlankConnectionString_Throws()
|
||||
{
|
||||
@@ -321,6 +333,7 @@ public class SecretsReplicationWiringTests
|
||||
$"{SecretsRegistration.StoreProviderKey}=SqlServer", ex.Message, StringComparison.Ordinal);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the central pre-host expander throws when the SqlServer connection string is itself a secret reference.</summary>
|
||||
[Fact]
|
||||
public void ExpanderCentral_StoreProviderSqlServer_SecretReferenceConnectionString_Throws()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user