feat: parse cluster and jetstream config blocks

This commit is contained in:
Joseph Doherty
2026-02-23 05:43:04 -05:00
parent d9f157d9e4
commit 44d426a7c5
7 changed files with 244 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
using NATS.Server.Configuration;
namespace NATS.Server.Tests;
public class ClusterJetStreamConfigProcessorTests
{
[Fact]
public void ConfigProcessor_maps_jetstream_and_cluster_blocks()
{
var cfg = """
cluster { name: C1; listen: 127.0.0.1:6222 }
jetstream { store_dir: /tmp/js; max_mem_store: 1GB; max_file_store: 10GB }
""";
var opts = ConfigProcessor.ProcessConfig(cfg);
opts.Cluster.ShouldNotBeNull();
opts.JetStream.ShouldNotBeNull();
opts.JetStream!.StoreDir.ShouldBe("/tmp/js");
}
}