2
0
mirror of synced 2025-01-13 18:14:14 +00:00

36 lines
889 B
C#
Raw Normal View History

using DistTestCore;
2023-05-10 08:53:57 +02:00
using NUnit.Framework;
namespace Tests.PeerDiscoveryTests
{
2023-05-10 09:09:31 +02:00
[TestFixture]
2023-05-10 08:53:57 +02:00
public class PeerDiscoveryTests : AutoBootstrapDistTest
{
[Test]
public void CanReportUnknownPeerId()
{
var unknownId = "16Uiu2HAkv2CHWpff3dj5iuVNERAp8AGKGNgpGjPexJZHSqUstfsK";
var node = SetupCodexNode();
var result = node.GetDebugPeer(unknownId);
Assert.That(result.IsPeerFound, Is.False);
}
2023-05-10 08:53:57 +02:00
[TestCase(2)]
[TestCase(3)]
[TestCase(10)]
[TestCase(20)]
public void VariableNodes(int number)
2023-05-10 08:53:57 +02:00
{
2023-08-24 15:32:08 +02:00
SetupCodexNodes(number);
2023-05-10 08:53:57 +02:00
AssertAllNodesConnected();
2023-05-10 08:53:57 +02:00
}
private void AssertAllNodesConnected()
2023-05-10 08:53:57 +02:00
{
2023-08-24 10:59:11 +02:00
CreatePeerConnectionTestHelpers().AssertFullyConnected(GetAllOnlineCodexNodes());
2023-05-10 08:53:57 +02:00
}
}
}