2
0
mirror of synced 2025-01-30 18:25:24 +00:00

43 lines
928 B
C#
Raw Normal View History

2023-09-12 15:43:30 +02:00
using CodexPlugin;
using DistTestCore;
using NUnit.Framework;
using Utils;
namespace CodexTests.BasicTests
2023-09-12 15:43:30 +02:00
{
[TestFixture]
public class OneClientTests : CodexDistTest
2023-09-12 15:43:30 +02:00
{
[Test]
public void OneClientTest()
{
2023-09-20 12:02:32 +02:00
var primary = Ci.StartCodexNode();
2023-09-12 15:43:30 +02:00
PerformOneClientTest(primary);
}
[Test]
public void RestartTest()
{
2023-09-20 12:02:32 +02:00
var primary = Ci.StartCodexNode();
2023-09-12 15:43:30 +02:00
primary.Stop(waitTillStopped: true);
2023-09-12 15:43:30 +02:00
2023-09-20 12:02:32 +02:00
primary = Ci.StartCodexNode();
2023-09-12 15:43:30 +02:00
PerformOneClientTest(primary);
}
2023-09-19 11:51:59 +02:00
private void PerformOneClientTest(ICodexNode primary)
2023-09-12 15:43:30 +02:00
{
var testFile = GenerateTestFile(1.MB());
var contentId = primary.UploadFile(testFile);
var downloadedFile = primary.DownloadContent(contentId);
testFile.AssertIsEqual(downloadedFile);
}
}
}