test(batch50): port 118 JetStream cluster 1 integration tests
Ports the first 118 tests from golang/nats-server/server/jetstream_cluster_1_test.go to C# integration tests in JetStream/JetStreamCluster1Tests.cs. Adds the Helpers/ scaffold (IntegrationTestBase, TestCluster, NatsTestClient, CheckHelper, ConfigHelper) and Xunit.SkippableFact package; tests skip automatically unless NATS_INTEGRATION_TESTS=true is set.
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
// Copyright 2020-2025 The NATS Authors
|
||||
// Licensed under the Apache License, Version 2.0
|
||||
|
||||
namespace ZB.MOM.NatsNet.Server.IntegrationTests.Helpers;
|
||||
|
||||
/// <summary>
|
||||
/// Provides NATS client connections for integration tests.
|
||||
/// </summary>
|
||||
public static class NatsTestClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Connects to the given test server. Throws <see cref="ClusterNotAvailableException"/>
|
||||
/// when no cluster server is available.
|
||||
/// </summary>
|
||||
public static IDisposable ConnectToServer(object server)
|
||||
{
|
||||
throw new ClusterNotAvailableException("Cannot connect: cluster server not available.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Connects to the given test server with JetStream context.
|
||||
/// Returns an (nc, js) tuple.
|
||||
/// </summary>
|
||||
public static (IDisposable Nc, object Js) ConnectWithJetStream(object server)
|
||||
{
|
||||
throw new ClusterNotAvailableException("Cannot connect: cluster server not available.");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user