cs-codex-dist-tests/ContinuousTests/Tests/TwoClientTest.cs

33 lines
846 B
C#
Raw Normal View History

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