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

33 lines
847 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-07-03 06:39:11 +00:00
public override TimeSpan RunTestEvery => TimeSpan.FromSeconds(30);
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()
{
file = FileManager.GenerateTestFile(10.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);
}
}
}