docs: strip task-tracking IDs from code comments and fill missing XML docs
Tracking IDs are review bookkeeping that rots in shipped source; the rationale they tagged is kept. Comment-only change (CommentChecker 458 -> 16 false positives).
This commit is contained in:
@@ -18,6 +18,10 @@ namespace ZB.MOM.WW.MxGateway.Tests.Configuration;
|
||||
/// </summary>
|
||||
public sealed class PreHostSecretExpansionTests
|
||||
{
|
||||
/// <summary>
|
||||
/// A seeded secret reference in configuration resolves to its plaintext.
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task ExpandConfiguration_SeededReference_ResolvesToPlaintext()
|
||||
{
|
||||
@@ -37,6 +41,7 @@ public sealed class PreHostSecretExpansionTests
|
||||
/// <c>${secret:ldap/mxgateway/bind}</c>. Proves that exact reference at that exact key resolves to
|
||||
/// the seeded plaintext through the same pre-host expander the host runs.
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task ExpandConfiguration_LdapBindReference_ResolvesToSeededPassword()
|
||||
{
|
||||
@@ -52,6 +57,10 @@ public sealed class PreHostSecretExpansionTests
|
||||
Assert.Equal(bindPassword, config["MxGateway:Ldap:ServiceAccountPassword"]);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A reference to an absent secret throws instead of leaving the token in place.
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task ExpandConfiguration_MissingReference_ThrowsFailClosed()
|
||||
{
|
||||
@@ -81,8 +90,11 @@ public sealed class PreHostSecretExpansionTests
|
||||
_envVarName = envVarName;
|
||||
}
|
||||
|
||||
/// <summary>Gets the secret resolver from the fixture's DI graph.</summary>
|
||||
public ISecretResolver Resolver => _provider.GetRequiredService<ISecretResolver>();
|
||||
|
||||
/// <summary>Creates a fixture with a unique SQLite store and master-key environment variable.</summary>
|
||||
/// <returns>The migrated fixture.</returns>
|
||||
public static SecretsFixture Create()
|
||||
{
|
||||
string unique = Guid.NewGuid().ToString("N");
|
||||
@@ -111,8 +123,13 @@ public sealed class PreHostSecretExpansionTests
|
||||
return new SecretsFixture(provider, sqlitePath, envVarName);
|
||||
}
|
||||
|
||||
// Seals a plaintext value under a fresh DEK and upserts it — the same store/cipher pair the
|
||||
// CLI 'secret set' verb uses.
|
||||
/// <summary>
|
||||
/// Seals a plaintext value under a fresh DEK and upserts it, using the same store/cipher pair
|
||||
/// the CLI 'secret set' verb uses.
|
||||
/// </summary>
|
||||
/// <param name="name">The secret name.</param>
|
||||
/// <param name="plaintext">The plaintext value to store.</param>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
public async Task SeedAsync(string name, string plaintext)
|
||||
{
|
||||
var secretName = new SecretName(name);
|
||||
@@ -122,11 +139,15 @@ public sealed class PreHostSecretExpansionTests
|
||||
await store.UpsertAsync(sealed_, default);
|
||||
}
|
||||
|
||||
/// <summary>Builds an in-memory configuration from the given key/value pairs.</summary>
|
||||
/// <param name="entries">The configuration entries.</param>
|
||||
/// <returns>The built configuration root.</returns>
|
||||
public IConfigurationRoot BuildConfig(params (string Key, string Value)[] entries) =>
|
||||
new ConfigurationBuilder()
|
||||
.AddInMemoryCollection(entries.ToDictionary(e => e.Key, e => (string?)e.Value))
|
||||
.Build();
|
||||
|
||||
/// <summary>Disposes the service provider and clears the test environment variable.</summary>
|
||||
public void Dispose()
|
||||
{
|
||||
_provider.Dispose();
|
||||
|
||||
Reference in New Issue
Block a user