mirror of
https://github.com/codex-storage/cs-codex-dist-tests.git
synced 2025-02-13 12:36:29 +00:00
Debugs AutoBootstrapDistTest
This commit is contained in:
parent
1d224cf2d3
commit
2a55328d11
@ -1,9 +1,9 @@
|
|||||||
namespace DistTestCore
|
using NUnit.Framework;
|
||||||
|
|
||||||
|
namespace DistTestCore
|
||||||
{
|
{
|
||||||
public class AutoBootstrapDistTest : DistTest
|
public class AutoBootstrapDistTest : DistTest
|
||||||
{
|
{
|
||||||
private IOnlineCodexNode? bootstrapNode;
|
|
||||||
|
|
||||||
public override IOnlineCodexNode SetupCodexBootstrapNode(Action<ICodexSetup> setup)
|
public override IOnlineCodexNode SetupCodexBootstrapNode(Action<ICodexSetup> setup)
|
||||||
{
|
{
|
||||||
throw new Exception("AutoBootstrapDistTest creates and attaches a single boostrap node for you. " +
|
throw new Exception("AutoBootstrapDistTest creates and attaches a single boostrap node for you. " +
|
||||||
@ -14,25 +14,16 @@
|
|||||||
{
|
{
|
||||||
var codexSetup = new CodexSetup(numberOfNodes);
|
var codexSetup = new CodexSetup(numberOfNodes);
|
||||||
setup(codexSetup);
|
setup(codexSetup);
|
||||||
codexSetup.WithBootstrapNode(EnsureBootstapNode());
|
codexSetup.WithBootstrapNode(BootstrapNode);
|
||||||
return BringOnline(codexSetup);
|
return BringOnline(codexSetup);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected IOnlineCodexNode BootstrapNode
|
[SetUp]
|
||||||
|
public void SetUpBootstrapNode()
|
||||||
{
|
{
|
||||||
get
|
BootstrapNode = BringOnline(new CodexSetup(1))[0];
|
||||||
{
|
|
||||||
return EnsureBootstapNode();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private IOnlineCodexNode EnsureBootstapNode()
|
protected IOnlineCodexNode BootstrapNode { get; private set; } = null!;
|
||||||
{
|
|
||||||
if (bootstrapNode == null)
|
|
||||||
{
|
|
||||||
bootstrapNode = base.SetupCodexBootstrapNode(s => { });
|
|
||||||
}
|
|
||||||
return bootstrapNode;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ using Utils;
|
|||||||
|
|
||||||
namespace Tests.PeerDiscoveryTests
|
namespace Tests.PeerDiscoveryTests
|
||||||
{
|
{
|
||||||
|
[TestFixture]
|
||||||
public class PeerDiscoveryTests : AutoBootstrapDistTest
|
public class PeerDiscoveryTests : AutoBootstrapDistTest
|
||||||
{
|
{
|
||||||
[Test]
|
[Test]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user