cs-codex-dist-tests/Tests/DownloadConnectivityTests/FullyConnectedDownloadTests.cs

43 lines
1.1 KiB
C#
Raw Normal View History

using DistTestCore;
using NUnit.Framework;
2023-09-08 07:39:56 +00:00
using Utils;
namespace Tests.DownloadConnectivityTests
{
[TestFixture]
public class FullyConnectedDownloadTests : AutoBootstrapDistTest
{
[Test]
public void MetricsDoesNotInterfereWithPeerDownload()
{
SetupCodexNodes(2, s => s.EnableMetrics());
AssertAllNodesConnected();
}
[Test]
public void MarketplaceDoesNotInterfereWithPeerDownload()
{
SetupCodexNodes(2, s => s.EnableMetrics().EnableMarketplace(1000.TestTokens()));
AssertAllNodesConnected();
}
2023-06-06 14:10:30 +00:00
[Test]
[Combinatorial]
public void FullyConnectedDownloadTest(
2023-09-08 12:03:47 +00:00
[Values(3, 5)] int numberOfNodes,
[Values(10, 80)] int sizeMBs)
{
2023-08-24 13:32:08 +00:00
SetupCodexNodes(numberOfNodes);
AssertAllNodesConnected(sizeMBs);
}
private void AssertAllNodesConnected(int sizeMBs = 10)
{
2023-08-24 08:59:11 +00:00
CreatePeerDownloadTestHelpers().AssertFullDownloadInterconnectivity(GetAllOnlineCodexNodes(), sizeMBs.MB());
}
}
}