feat: add jetstream stream lifecycle api

This commit is contained in:
Joseph Doherty
2026-02-23 06:02:07 -05:00
parent 788f4254b0
commit 5f530de2e4
5 changed files with 221 additions and 20 deletions

View File

@@ -0,0 +1,15 @@
namespace NATS.Server.Tests;
public class JetStreamStreamApiTests
{
[Fact]
public async Task Stream_create_and_info_roundtrip()
{
var create = await JetStreamApiFixture.RequestAsync("$JS.API.STREAM.CREATE.ORDERS", "{\"name\":\"ORDERS\",\"subjects\":[\"orders.*\"]}");
create.Error.ShouldBeNull();
var info = await JetStreamApiFixture.RequestAsync("$JS.API.STREAM.INFO.ORDERS", "{}");
info.Error.ShouldBeNull();
info.StreamInfo!.Config.Name.ShouldBe("ORDERS");
}
}