2023-03-21 12:20:21 +00:00
|
|
|
|
using CodexDistTestCore;
|
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
|
|
|
|
|
namespace LongTests.BasicTests
|
|
|
|
|
{
|
|
|
|
|
[TestFixture]
|
|
|
|
|
public class SimpleTests : DistTest
|
|
|
|
|
{
|
|
|
|
|
[Test, UseLongTimeouts]
|
|
|
|
|
public void OneClientLargeFileTest()
|
|
|
|
|
{
|
2023-03-21 14:17:48 +00:00
|
|
|
|
var primary = SetupCodexNodes(1)
|
2023-03-21 12:20:21 +00:00
|
|
|
|
.WithLogLevel(CodexLogLevel.Warn)
|
|
|
|
|
.WithStorageQuota(10.GB())
|
2023-03-21 14:17:48 +00:00
|
|
|
|
.BringOnline()[0];
|
2023-03-21 12:20:21 +00:00
|
|
|
|
|
|
|
|
|
var testFile = GenerateTestFile(1.GB());
|
|
|
|
|
|
|
|
|
|
var contentId = primary.UploadFile(testFile);
|
|
|
|
|
|
|
|
|
|
var downloadedFile = primary.DownloadContent(contentId);
|
|
|
|
|
|
|
|
|
|
testFile.AssertIsEqual(downloadedFile);
|
|
|
|
|
}
|
2023-03-22 10:07:18 +00:00
|
|
|
|
|
|
|
|
|
[Test, UseLongTimeouts]
|
|
|
|
|
public void TestEnvironmentAddressSpaceTest()
|
|
|
|
|
{
|
|
|
|
|
var group = SetupCodexNodes(1000).BringOnline();
|
|
|
|
|
|
|
|
|
|
var nodeIds = group.Select(n => n.GetDebugInfo().id).ToArray();
|
|
|
|
|
|
|
|
|
|
Assert.That(nodeIds.Length, Is.EqualTo(nodeIds.Distinct().Count()),
|
|
|
|
|
"Not all created nodes provided a unique id.");
|
|
|
|
|
}
|
2023-03-21 12:20:21 +00:00
|
|
|
|
}
|
|
|
|
|
}
|