fix(p7-09): move DirectoryStoreTests to Accounts/, add missing PriorityPolicy test case

This commit is contained in:
Joseph Doherty
2026-02-26 20:10:04 -05:00
parent f0faaffe69
commit 9552f6e7e9
4 changed files with 61 additions and 2 deletions

View File

@@ -21,7 +21,7 @@ using System.Security.Cryptography;
using System.Text;
using Shouldly;
namespace ZB.MOM.NatsNet.Server.Tests.Auth;
namespace ZB.MOM.NatsNet.Server.Tests.Accounts;
/// <summary>
/// Unit tests for <see cref="DirJwtStore"/> expiration, limits, LRU eviction,

View File

@@ -234,6 +234,26 @@ public sealed class JetStreamVersioningTests
}
}
// -------------------------------------------------------------------------
// T:1797-extra — SetStaticConsumerMetadata_RequiresLevel1_ForPriorityFeatures
// Missing case: PriorityPolicy != PriorityNone with empty PriorityGroups should
// still require API level 1.
// -------------------------------------------------------------------------
[Theory]
[InlineData("PolicyOnly")]
public void SetStaticConsumerMetadata_RequiresLevel1_ForPriorityFeatures(string desc)
{
// Case: PriorityPolicy != PriorityNone with no groups should still require level 1
var cfg = new ConsumerConfig { PriorityPolicy = PriorityPolicy.PriorityPinnedClient };
JetStreamVersioning.SetStaticConsumerMetadata(cfg);
var level = cfg.Metadata![JetStreamVersioning.JsRequiredLevelMetadataKey];
level.ShouldBe("1", $"case: {desc}");
int.Parse(level).ShouldBeLessThanOrEqualTo(JetStreamVersioning.JsApiLevel,
customMessage: $"case: {desc}");
}
// -------------------------------------------------------------------------
// T:1798 — TestJetStreamSetStaticConsumerMetadataRemoveDynamicFields
// -------------------------------------------------------------------------

View File

@@ -1,6 +1,6 @@
# NATS .NET Porting Status Report
Generated: 2026-02-27 01:02:01 UTC
Generated: 2026-02-27 01:10:05 UTC
## Modules (12 total)

39
reports/report_f0faaff.md Normal file
View File

@@ -0,0 +1,39 @@
# NATS .NET Porting Status Report
Generated: 2026-02-27 01:10:05 UTC
## Modules (12 total)
| Status | Count |
|--------|-------|
| not_started | 1 |
| verified | 11 |
## Features (3673 total)
| Status | Count |
|--------|-------|
| complete | 3368 |
| n_a | 26 |
| verified | 279 |
## Unit Tests (3257 total)
| Status | Count |
|--------|-------|
| complete | 276 |
| deferred | 554 |
| n_a | 187 |
| not_started | 2126 |
| verified | 114 |
## Library Mappings (36 total)
| Status | Count |
|--------|-------|
| mapped | 36 |
## Overall Progress
**4261/6942 items complete (61.4%)**