2023-06-21 09:27:59 +02:00
|
|
|
|
using DistTestCore;
|
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
|
|
|
|
|
namespace ContinuousTests.Tests
|
|
|
|
|
{
|
2023-06-25 10:50:01 +02:00
|
|
|
|
public class TwoClientTest : ContinuousTest
|
|
|
|
|
{
|
|
|
|
|
public override int RequiredNumberOfNodes => 2;
|
2023-08-24 10:44:06 +02:00
|
|
|
|
public override TimeSpan RunTestEvery => TimeSpan.FromMinutes(1);
|
2023-06-25 10:50:01 +02:00
|
|
|
|
public override TestFailMode TestFailMode => TestFailMode.StopAfterFirstFailure;
|
2023-06-21 09:27:59 +02:00
|
|
|
|
|
2023-06-25 10:50:01 +02:00
|
|
|
|
private ContentId? cid;
|
|
|
|
|
private TestFile file = null!;
|
2023-06-21 09:27:59 +02:00
|
|
|
|
|
2023-06-25 10:50:01 +02:00
|
|
|
|
[TestMoment(t: Zero)]
|
|
|
|
|
public void UploadTestFile()
|
|
|
|
|
{
|
|
|
|
|
file = FileManager.GenerateTestFile(10.MB());
|
2023-06-21 09:27:59 +02:00
|
|
|
|
|
2023-06-25 10:50:01 +02:00
|
|
|
|
cid = UploadFile(Nodes[0], file);
|
|
|
|
|
Assert.That(cid, Is.Not.Null);
|
|
|
|
|
}
|
2023-06-21 09:27:59 +02:00
|
|
|
|
|
2023-07-03 08:39:11 +02:00
|
|
|
|
[TestMoment(t: 10)]
|
2023-06-25 10:50:01 +02:00
|
|
|
|
public void DownloadTestFile()
|
|
|
|
|
{
|
2023-06-28 15:11:20 +02:00
|
|
|
|
var dl = DownloadFile(Nodes[1], cid!);
|
2023-06-25 10:50:01 +02:00
|
|
|
|
|
|
|
|
|
file.AssertIsEqual(dl);
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-06-21 09:27:59 +02:00
|
|
|
|
}
|