feat: complete remaining jetstream parity implementation plan
This commit is contained in:
17
tests/NATS.Server.Tests/JetStreamSnapshotRestoreApiTests.cs
Normal file
17
tests/NATS.Server.Tests/JetStreamSnapshotRestoreApiTests.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace NATS.Server.Tests;
|
||||
|
||||
public class JetStreamSnapshotRestoreApiTests
|
||||
{
|
||||
[Fact]
|
||||
public async Task Snapshot_then_restore_reconstructs_messages()
|
||||
{
|
||||
await using var fx = await JetStreamApiFixture.StartWithStreamAsync("ORDERS", "orders.*");
|
||||
_ = await fx.PublishAndGetAckAsync("orders.created", "1");
|
||||
|
||||
var snap = await fx.RequestLocalAsync("$JS.API.STREAM.SNAPSHOT.ORDERS", "{}");
|
||||
snap.Snapshot.ShouldNotBeNull();
|
||||
|
||||
var restore = await fx.RequestLocalAsync("$JS.API.STREAM.RESTORE.ORDERS", snap.Snapshot!.Payload);
|
||||
restore.Success.ShouldBeTrue();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user