2023-08-18 08:31:20 +00:00
|
|
|
|
using DistTestCore;
|
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
|
|
|
|
|
namespace ContinuousTests.Tests
|
|
|
|
|
{
|
|
|
|
|
public class HoldMyBeerTest : ContinuousTest
|
|
|
|
|
{
|
|
|
|
|
public override int RequiredNumberOfNodes => 1;
|
2023-08-24 08:44:06 +00:00
|
|
|
|
public override TimeSpan RunTestEvery => TimeSpan.FromMinutes(5);
|
2023-08-18 08:31:20 +00:00
|
|
|
|
public override TestFailMode TestFailMode => TestFailMode.StopAfterFirstFailure;
|
|
|
|
|
|
|
|
|
|
private ContentId? cid;
|
|
|
|
|
private TestFile file = null!;
|
|
|
|
|
|
|
|
|
|
[TestMoment(t: Zero)]
|
|
|
|
|
public void UploadTestFile()
|
|
|
|
|
{
|
2023-09-01 08:39:41 +00:00
|
|
|
|
var filesize = 80.MB();
|
2023-08-18 08:31:20 +00:00
|
|
|
|
|
|
|
|
|
file = FileManager.GenerateTestFile(filesize);
|
|
|
|
|
|
|
|
|
|
cid = UploadFile(Nodes[0], file);
|
|
|
|
|
Assert.That(cid, Is.Not.Null);
|
|
|
|
|
|
2023-08-22 07:06:44 +00:00
|
|
|
|
var dl = DownloadFile(Nodes[0], cid!);
|
2023-08-18 08:31:20 +00:00
|
|
|
|
file.AssertIsEqual(dl);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|