2
0
mirror of synced 2025-01-13 18:14:14 +00:00
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 09:39:56 +02: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 16:10:30 +02:00
[Test]
[Combinatorial]
public void FullyConnectedDownloadTest(
2023-09-08 14:03:47 +02:00
[Values(3, 5)] int numberOfNodes,
[Values(10, 80)] int sizeMBs)
{
2023-08-24 15:32:08 +02:00
SetupCodexNodes(numberOfNodes);
AssertAllNodesConnected(sizeMBs);
}
private void AssertAllNodesConnected(int sizeMBs = 10)
{
2023-08-24 10:59:11 +02:00
CreatePeerDownloadTestHelpers().AssertFullDownloadInterconnectivity(GetAllOnlineCodexNodes(), sizeMBs.MB());
}
}
}