36 lines
906 B
C#
Raw Permalink Normal View History

using LogosStorageClient;
using StoragePlugin;
2025-04-25 15:42:13 +02:00
using NUnit.Framework;
2023-09-12 15:43:30 +02:00
namespace LogosStorageTests
2023-09-12 15:43:30 +02:00
{
public class AutoBootstrapDistTest : LogosStorageDistTest
2023-09-12 15:43:30 +02:00
{
private bool isBooting = false;
public IStorageNode BootstrapNode { get; private set; } = null!;
2025-04-25 15:42:13 +02:00
[SetUp]
public void SetupBootstrapNode()
2023-09-12 15:43:30 +02:00
{
2025-04-25 15:42:13 +02:00
isBooting = true;
BootstrapNode = StartLogosStorage(s => s.WithName("BOOTSTRAP_" + GetTestNamespace()));
2025-04-25 15:42:13 +02:00
isBooting = false;
}
2025-04-25 15:42:13 +02:00
[TearDown]
public void TearDownBootstrapNode()
{
2025-04-25 15:42:13 +02:00
BootstrapNode.Stop(waitTillStopped: false);
}
protected override void OnLogosStorageSetup(ILogosStorageSetup setup)
{
if (isBooting) return;
var node = BootstrapNode;
if (node != null) setup.WithBootstrapNode(node);
2023-09-12 15:43:30 +02:00
}
}
}