feat: add jetstream config validation models

This commit is contained in:
Joseph Doherty
2026-02-23 05:59:03 -05:00
parent 6d23e89fe8
commit d1935bc9ec
4 changed files with 68 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
using NATS.Server.JetStream.Models;
using NATS.Server.JetStream.Validation;
namespace NATS.Server.Tests;
public class JetStreamConfigValidationTests
{
[Fact]
public void Stream_requires_name_and_subjects()
{
var config = new StreamConfig { Name = "", Subjects = [] };
var result = JetStreamConfigValidator.Validate(config);
result.IsValid.ShouldBeFalse();
}
}