refactor: extract NATS.Server.JetStream.Tests project
Move 225 JetStream-related test files from NATS.Server.Tests into a dedicated NATS.Server.JetStream.Tests project. This includes root-level JetStream*.cs files, storage test files (FileStore, MemStore, StreamStoreContract), and the full JetStream/ subfolder tree (Api, Cluster, Consumers, MirrorSource, Snapshots, Storage, Streams). Updated all namespaces, added InternalsVisibleTo, registered in the solution file, and added the JETSTREAM_INTEGRATION_MATRIX define.
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using NATS.Server.JetStream;
|
||||
using NATS.Server.JetStream.Api;
|
||||
|
||||
namespace NATS.Server.JetStream.Tests;
|
||||
|
||||
public class JetStreamApiRouterCoverageTests
|
||||
{
|
||||
[Theory]
|
||||
[InlineData("$JS.API.STREAM.UPDATE.ORDERS")]
|
||||
[InlineData("$JS.API.STREAM.DELETE.ORDERS")]
|
||||
[InlineData("$JS.API.STREAM.PURGE.ORDERS")]
|
||||
[InlineData("$JS.API.CONSUMER.DELETE.ORDERS.DUR")]
|
||||
[InlineData("$JS.API.CONSUMER.MSG.NEXT.ORDERS.DUR")]
|
||||
public void Router_recognizes_remaining_subject_families(string subject)
|
||||
{
|
||||
var streams = new StreamManager();
|
||||
_ = streams.CreateOrUpdate(new NATS.Server.JetStream.Models.StreamConfig
|
||||
{
|
||||
Name = "ORDERS",
|
||||
Subjects = ["orders.*"],
|
||||
});
|
||||
var consumers = new ConsumerManager();
|
||||
_ = consumers.CreateOrUpdate("ORDERS", new NATS.Server.JetStream.Models.ConsumerConfig
|
||||
{
|
||||
DurableName = "DUR",
|
||||
});
|
||||
|
||||
var router = new JetStreamApiRouter(streams, consumers);
|
||||
var response = router.Route(subject, "{}"u8);
|
||||
response.Error.ShouldBeNull();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user