chore(secrets): wire cache invalidation on rotate/delete, drop dead RevealEnabled, remove scaffold leftovers
This commit is contained in:
@@ -163,6 +163,23 @@ public class DefaultSecretResolverTests
|
||||
Assert.Equal(2, store.GetCount);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Invalidate_ViaCacheInvalidatorSeam_ForcesReload()
|
||||
{
|
||||
var (resolver, store, _, cipher, _) = NewSut();
|
||||
var name = new SecretName("sql/foo");
|
||||
store.Seed(MakeRow(cipher, name, "hunter2"));
|
||||
|
||||
// Exercise the SAME seam the write path (Ui rotate/delete) uses: ISecretCacheInvalidator.
|
||||
ISecretCacheInvalidator invalidator = resolver;
|
||||
|
||||
await resolver.GetAsync(name, CancellationToken.None); // caches (count 1)
|
||||
invalidator.Invalidate(name);
|
||||
await resolver.GetAsync(name, CancellationToken.None); // cache evicted → hits the store again
|
||||
|
||||
Assert.Equal(2, store.GetCount);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Get_DefaultActorIsSystem_WhenNoAccessor()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user