2023-03-17 10:43:29 +00:00
|
|
|
|
using CodexDistTests.TestCore;
|
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
|
|
|
|
|
namespace CodexDistTests.BasicTests
|
|
|
|
|
{
|
|
|
|
|
[TestFixture]
|
|
|
|
|
public class DebugEndpointTests : DistTest
|
|
|
|
|
{
|
|
|
|
|
[Test]
|
|
|
|
|
public void GetDebugInfo()
|
|
|
|
|
{
|
2023-03-19 09:49:03 +00:00
|
|
|
|
var node = SetupCodexNode().BringOnline();
|
2023-03-17 10:43:29 +00:00
|
|
|
|
|
|
|
|
|
var debugInfo = node.GetDebugInfo();
|
|
|
|
|
|
|
|
|
|
Assert.That(debugInfo.spr, Is.Not.Empty);
|
|
|
|
|
}
|
2023-03-19 09:49:03 +00:00
|
|
|
|
|
|
|
|
|
//[Test]
|
|
|
|
|
//public void TwoClientTest()
|
|
|
|
|
//{
|
|
|
|
|
// var primaryNodex = SetupCodexNode()
|
|
|
|
|
// .WithLogLevel(CodexLogLevel.Warn)
|
|
|
|
|
// .WithStorageQuota(1024 * 1024)
|
|
|
|
|
// .BringOnline();
|
|
|
|
|
|
|
|
|
|
// var secondaryNodex = SetupCodexNode()
|
|
|
|
|
// .WithBootstrapNode(primaryNodex)
|
|
|
|
|
// .BringOnline();
|
|
|
|
|
|
|
|
|
|
// var testFile = GenerateTestFile(1024 * 1024);
|
|
|
|
|
|
|
|
|
|
// var contentId = primaryNodex.UploadFile(testFile);
|
|
|
|
|
|
|
|
|
|
// var downloadedFile = secondaryNodex.DownloadContent(contentId);
|
|
|
|
|
|
|
|
|
|
// testFile.AssertIsEqual(downloadedFile);
|
|
|
|
|
|
|
|
|
|
// // Test files are automatically deleted.
|
|
|
|
|
// // Online nodes are automatically destroyed.
|
|
|
|
|
//}
|
2023-03-17 10:43:29 +00:00
|
|
|
|
}
|
|
|
|
|
}
|