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:
+13
-1
@@ -13,7 +13,7 @@ using ZB.MOM.WW.Secrets.Sqlite;
|
||||
namespace ZB.MOM.WW.ScadaBridge.SiteRuntime.Tests.Secrets;
|
||||
|
||||
/// <summary>
|
||||
/// Task 9 fix round 2 (review <c>task-9-rereview-1.md</c> recommendation #2): runs
|
||||
/// Runs
|
||||
/// <see cref="DeployedSecretsMirror"/> against the REAL <c>ZB.MOM.WW.Secrets</c> stack —
|
||||
/// <see cref="SqliteSecretStore"/> + <see cref="AesGcmEnvelopeCipher"/> +
|
||||
/// <see cref="DefaultSecretResolver"/> over a real temp-file SQLite database — instead of the
|
||||
@@ -40,6 +40,8 @@ public sealed class DeployedSecretsMirrorRealStackTests : IAsyncLifetime, IDispo
|
||||
private DefaultSecretResolver _resolver = null!;
|
||||
private SiteStorageService _storage = null!;
|
||||
|
||||
/// <summary>Prepares the test fixture before the first test runs.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
public async Task InitializeAsync()
|
||||
{
|
||||
var connectionFactory = new SecretsSqliteConnectionFactory(_secretsDbPath);
|
||||
@@ -58,8 +60,11 @@ public sealed class DeployedSecretsMirrorRealStackTests : IAsyncLifetime, IDispo
|
||||
await _storage.InitializeAsync();
|
||||
}
|
||||
|
||||
/// <summary>Does nothing; cleanup happens in <c>Dispose</c>.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
public Task DisposeAsync() => Task.CompletedTask;
|
||||
|
||||
/// <summary>Releases the resources held by this instance.</summary>
|
||||
public void Dispose()
|
||||
{
|
||||
var path = _localDb.Path;
|
||||
@@ -71,6 +76,8 @@ public sealed class DeployedSecretsMirrorRealStackTests : IAsyncLifetime, IDispo
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Verifies that against the real secrets stack an encrypt, apply, delete and re-add cycle yields a recovered row that resolves to the original plaintext.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task RealStack_EncryptApplyDeleteReAdd_TheRecoveredRowResolvesToTheOriginalPlaintext()
|
||||
{
|
||||
@@ -150,10 +157,15 @@ public sealed class DeployedSecretsMirrorRealStackTests : IAsyncLifetime, IDispo
|
||||
{
|
||||
private readonly byte[] _key = System.Security.Cryptography.RandomNumberGenerator.GetBytes(32);
|
||||
|
||||
/// <summary>Initializes the provider with a key encryption key id.</summary>
|
||||
/// <param name="kekId">The key encryption key id reported by the provider.</param>
|
||||
public FakeMasterKeyProvider(string kekId) => KekId = kekId;
|
||||
|
||||
/// <summary>Gets the key encryption key id.</summary>
|
||||
public string KekId { get; }
|
||||
|
||||
/// <summary>Returns the fixed master key.</summary>
|
||||
/// <returns>The master key bytes.</returns>
|
||||
public ReadOnlyMemory<byte> GetMasterKey() => _key;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user