2
0
mirror of synced 2025-01-13 18:14:14 +00:00

41 lines
887 B
C#
Raw Normal View History

2023-04-14 14:53:39 +02:00
using DistTestCore;
using NUnit.Framework;
namespace Tests.BasicTests
{
[TestFixture]
public class OneClientTests : DistTest
{
[Test]
public void OneClientTest()
{
2023-04-25 12:52:11 +02:00
var primary = SetupCodexNode();
2023-04-14 14:53:39 +02:00
PerformOneClientTest(primary);
}
[Test]
public void RestartTest()
{
2023-04-25 12:52:11 +02:00
var primary = SetupCodexNode();
2023-04-14 14:53:39 +02:00
2023-04-25 12:52:11 +02:00
var setup = primary.BringOffline();
2023-04-14 14:53:39 +02:00
2023-04-25 12:52:11 +02:00
primary = BringOnline(setup)[0];
2023-04-14 14:53:39 +02:00
PerformOneClientTest(primary);
}
private void PerformOneClientTest(IOnlineCodexNode primary)
{
var testFile = GenerateTestFile(1.MB());
var contentId = primary.UploadFile(testFile);
var downloadedFile = primary.DownloadContent(contentId);
testFile.AssertIsEqual(downloadedFile);
}
}
}