Fixes namespaces for experimental tests
This commit is contained in:
parent
c1e3e8be09
commit
413a46c761
@ -2,17 +2,28 @@
|
||||
{
|
||||
public class CodexExePath
|
||||
{
|
||||
private readonly string path = Path.Combine(
|
||||
"d:",
|
||||
"Dev",
|
||||
"nim-codex",
|
||||
"build",
|
||||
"codex.exe"
|
||||
);
|
||||
private readonly string[] paths = [
|
||||
Path.Combine("d:", "Dev", "nim-codex", "build", "codex.exe"),
|
||||
Path.Combine("c:", "Projects", "nim-codex", "build", "codex.exe")
|
||||
];
|
||||
|
||||
private string selectedPath = string.Empty;
|
||||
|
||||
public CodexExePath()
|
||||
{
|
||||
foreach (var p in paths)
|
||||
{
|
||||
if (File.Exists(p))
|
||||
{
|
||||
selectedPath = p;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string Get()
|
||||
{
|
||||
return path;
|
||||
return selectedPath;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,9 @@
|
||||
using NUnit.Framework;
|
||||
using MetricsPlugin;
|
||||
using Utils;
|
||||
using CodexTests;
|
||||
|
||||
namespace CodexTests.BasicTests
|
||||
namespace ExperimentalTests.BasicTests
|
||||
{
|
||||
[TestFixture]
|
||||
public class AsyncProfiling : CodexDistTest
|
||||
|
@ -1,11 +1,12 @@
|
||||
using CodexClient;
|
||||
using CodexPlugin;
|
||||
using CodexTests;
|
||||
using DistTestCore;
|
||||
using MetricsPlugin;
|
||||
using NUnit.Framework;
|
||||
using Utils;
|
||||
|
||||
namespace CodexTests.BasicTests
|
||||
namespace ExperimentalTests.BasicTests
|
||||
{
|
||||
[TestFixture]
|
||||
public class ExampleTests : CodexDistTest
|
||||
|
@ -2,12 +2,13 @@
|
||||
using CodexContractsPlugin;
|
||||
using CodexContractsPlugin.Marketplace;
|
||||
using CodexPlugin;
|
||||
using CodexTests;
|
||||
using FileUtils;
|
||||
using GethPlugin;
|
||||
using NUnit.Framework;
|
||||
using Utils;
|
||||
|
||||
namespace CodexTests.BasicTests
|
||||
namespace ExperimentalTests.BasicTests
|
||||
{
|
||||
[TestFixture]
|
||||
public class MarketplaceTests : AutoBootstrapDistTest
|
||||
@ -24,14 +25,14 @@ namespace CodexTests.BasicTests
|
||||
var hostInitialBalance = 234.TstWei();
|
||||
var clientInitialBalance = 100000.TstWei();
|
||||
var fileSize = new ByteSize(
|
||||
numBlocks * (64 * 1024) +
|
||||
numBlocks * 64 * 1024 +
|
||||
plusSizeKb * 1024 +
|
||||
plusSizeBytes
|
||||
);
|
||||
|
||||
var geth = StartGethNode(s => s.IsMiner().WithName("disttest-geth"));
|
||||
var contracts = Ci.StartCodexContracts(geth);
|
||||
|
||||
|
||||
var numberOfHosts = 5;
|
||||
var hosts = StartCodex(numberOfHosts, s => s
|
||||
.WithName("Host")
|
||||
@ -81,7 +82,7 @@ namespace CodexTests.BasicTests
|
||||
};
|
||||
|
||||
var purchaseContract = client.Marketplace.RequestStorage(purchase);
|
||||
|
||||
|
||||
var contractCid = purchaseContract.ContentId;
|
||||
Assert.That(uploadCid.Id, Is.Not.EqualTo(contractCid.Id));
|
||||
|
||||
|
@ -1,8 +1,9 @@
|
||||
using CodexClient;
|
||||
using CodexTests;
|
||||
using NUnit.Framework;
|
||||
using Utils;
|
||||
|
||||
namespace CodexTests.BasicTests
|
||||
namespace ExperimentalTests.BasicTests
|
||||
{
|
||||
[TestFixture]
|
||||
public class PyramidTests : CodexDistTest
|
||||
@ -46,7 +47,7 @@ namespace CodexTests.BasicTests
|
||||
var uploadTasks = new List<Task<ContentId>>();
|
||||
foreach (var node in layer)
|
||||
{
|
||||
uploadTasks.Add(Task.Run<ContentId>(() =>
|
||||
uploadTasks.Add(Task.Run(() =>
|
||||
{
|
||||
var file = GenerateTestFile(size);
|
||||
return node.UploadFile(file);
|
||||
|
@ -14,8 +14,8 @@ namespace ExperimentalTests.DownloadConnectivityTests
|
||||
[Test]
|
||||
[Combinatorial]
|
||||
public void SingleSetTest(
|
||||
[Values(10, 100, 1000)] int fileSizeMb,
|
||||
[Values(5, 10, 20, 30)] int numDownloaders
|
||||
[Values(1000)] int fileSizeMb,
|
||||
[Values(10, 20, 30)] int numDownloaders
|
||||
)
|
||||
{
|
||||
var file = GenerateTestFile(fileSizeMb.MB());
|
||||
|
@ -1,7 +1,8 @@
|
||||
using CodexClient;
|
||||
using CodexTests;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace CodexTests.PeerDiscoveryTests
|
||||
namespace ExperimentalTests.PeerDiscoveryTests
|
||||
{
|
||||
[TestFixture]
|
||||
public class LayeredDiscoveryTests : CodexDistTest
|
||||
@ -36,7 +37,7 @@ namespace CodexTests.PeerDiscoveryTests
|
||||
{
|
||||
var nodes = new List<ICodexNode>();
|
||||
var node = StartCodex();
|
||||
nodes.Add(node);
|
||||
nodes.Add(node);
|
||||
|
||||
for (var i = 1; i < chainLength; i++)
|
||||
{
|
||||
|
@ -2,8 +2,9 @@
|
||||
using CodexClient;
|
||||
using NUnit.Framework;
|
||||
using Utils;
|
||||
using CodexTests;
|
||||
|
||||
namespace CodexTests.PeerDiscoveryTests
|
||||
namespace ExperimentalTests.PeerDiscoveryTests
|
||||
{
|
||||
[TestFixture]
|
||||
public class PeerDiscoveryTests : AutoBootstrapDistTest
|
||||
|
@ -3,7 +3,7 @@ using Logging;
|
||||
using NUnit.Framework;
|
||||
using Utils;
|
||||
|
||||
namespace CodexTests.UtilityTests
|
||||
namespace ExperimentalTests.UtilityTests
|
||||
{
|
||||
[TestFixture]
|
||||
public class ClusterDiscSpeedTests : DistTest
|
||||
|
@ -2,6 +2,7 @@
|
||||
using CodexContractsPlugin;
|
||||
using CodexDiscordBotPlugin;
|
||||
using CodexPlugin;
|
||||
using CodexTests;
|
||||
using Core;
|
||||
using DiscordRewards;
|
||||
using DistTestCore;
|
||||
@ -12,7 +13,7 @@ using Newtonsoft.Json;
|
||||
using NUnit.Framework;
|
||||
using Utils;
|
||||
|
||||
namespace CodexTests.UtilityTests
|
||||
namespace ExperimentalTests.UtilityTests
|
||||
{
|
||||
[TestFixture]
|
||||
public class DiscordBotTests : AutoBootstrapDistTest
|
||||
@ -25,7 +26,7 @@ namespace CodexTests.UtilityTests
|
||||
private readonly List<ulong> rewardsSeen = new List<ulong>();
|
||||
private readonly TimeSpan rewarderInterval = TimeSpan.FromMinutes(1);
|
||||
private readonly List<ChainEventMessage> receivedEvents = new List<ChainEventMessage>();
|
||||
|
||||
|
||||
[Test]
|
||||
[DontDownloadLogs]
|
||||
[Ignore("Used to debug testnet bots.")]
|
||||
@ -238,7 +239,7 @@ namespace CodexTests.UtilityTests
|
||||
if (h > minNumHosts) minNumHosts = h;
|
||||
}
|
||||
|
||||
var minFileSize = ((minSlotSize + 1024) * minNumHosts);
|
||||
var minFileSize = (minSlotSize + 1024) * minNumHosts;
|
||||
return new ByteSize(Convert.ToInt64(minFileSize));
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,9 @@
|
||||
using CodexClient;
|
||||
using CodexTests;
|
||||
using NUnit.Framework;
|
||||
using Utils;
|
||||
|
||||
namespace CodexTests.UtilityTests
|
||||
namespace ExperimentalTests.UtilityTests
|
||||
{
|
||||
[TestFixture]
|
||||
public class LogHelperTests : AutoBootstrapDistTest
|
||||
|
@ -4,7 +4,7 @@ using DistTestCore;
|
||||
using NUnit.Framework;
|
||||
using Utils;
|
||||
|
||||
namespace CodexTests.UtilityTests
|
||||
namespace ExperimentalTests.UtilityTests
|
||||
{
|
||||
// Warning!
|
||||
// This is a test to check network-isolation in the test-infrastructure.
|
||||
|
Loading…
x
Reference in New Issue
Block a user