feat: complete remaining jetstream parity implementation plan
This commit is contained in:
22
tests/NATS.Server.Tests/JetStreamPolicyValidationTests.cs
Normal file
22
tests/NATS.Server.Tests/JetStreamPolicyValidationTests.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using NATS.Server.JetStream.Models;
|
||||
using NATS.Server.JetStream.Validation;
|
||||
|
||||
namespace NATS.Server.Tests;
|
||||
|
||||
public class JetStreamPolicyValidationTests
|
||||
{
|
||||
[Fact]
|
||||
public void Validator_rejects_invalid_policy_combinations()
|
||||
{
|
||||
var cfg = new StreamConfig
|
||||
{
|
||||
Name = "S",
|
||||
Subjects = ["s.*"],
|
||||
Retention = RetentionPolicy.WorkQueue,
|
||||
MaxConsumers = 0,
|
||||
};
|
||||
|
||||
var result = JetStreamConfigValidator.Validate(cfg);
|
||||
result.IsValid.ShouldBeFalse();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user