This commit is contained in:
benbierens 2023-10-04 09:36:59 +02:00
parent 917d715497
commit ccc4732752
No known key found for this signature in database
GPG Key ID: FE44815D96D0A1AA
4 changed files with 3 additions and 14 deletions

View File

@ -1,5 +1,4 @@
using KubernetesWorkflow; using KubernetesWorkflow;
using Utils;
namespace Core namespace Core
{ {

View File

@ -74,8 +74,6 @@ namespace ContinuousTests
return GetType().Name; return GetType().Name;
} }
} }
public IPluginTools Tools { get; internal set; }
} }
public enum TestFailMode public enum TestFailMode

View File

@ -6,7 +6,6 @@ using System.Reflection;
using CodexPlugin; using CodexPlugin;
using DistTestCore.Logs; using DistTestCore.Logs;
using Core; using Core;
using System.ComponentModel;
namespace ContinuousTests namespace ContinuousTests
{ {
@ -63,7 +62,6 @@ namespace ContinuousTests
private void RunTest(Action<bool> resultHandler) private void RunTest(Action<bool> resultHandler)
{ {
var ci = entryPoint.CreateInterface();
var testStart = DateTime.UtcNow; var testStart = DateTime.UtcNow;
try try
@ -105,14 +103,13 @@ namespace ContinuousTests
// The test failed just now. We can't expect the logs to be available in elastic-search immediately: // The test failed just now. We can't expect the logs to be available in elastic-search immediately:
Thread.Sleep(TimeSpan.FromMinutes(1)); Thread.Sleep(TimeSpan.FromMinutes(1));
var effectiveStart = testStart.Subtract(TimeSpan.FromSeconds(10)); var effectiveStart = testStart.Subtract(TimeSpan.FromSeconds(30));
var effectiveEnd = DateTime.UtcNow.AddSeconds(30); var effectiveEnd = DateTime.UtcNow;
var elasticSearchLogDownloader = new ElasticSearchLogDownloader(entryPoint.Tools, fixtureLog); var elasticSearchLogDownloader = new ElasticSearchLogDownloader(entryPoint.Tools, fixtureLog);
foreach (var node in nodes) foreach (var node in nodes)
{ {
var container = node.Container; elasticSearchLogDownloader.Download(fixtureLog.CreateSubfile(), node.Container, effectiveStart, effectiveEnd);
elasticSearchLogDownloader.Download(fixtureLog.CreateSubfile(), container, effectiveStart, effectiveEnd);
} }
} }
@ -210,7 +207,6 @@ namespace ContinuousTests
{ {
Log($" > Running TestMoment '{name}'"); Log($" > Running TestMoment '{name}'");
handle.Test.Initialize(nodes, fixtureLog, entryPoint.Tools.GetFileManager(), config, cancelToken); handle.Test.Initialize(nodes, fixtureLog, entryPoint.Tools.GetFileManager(), config, cancelToken);
handle.Test.Tools = entryPoint.Tools;
} }
private void DecommissionTest() private void DecommissionTest()

View File

@ -26,10 +26,6 @@ namespace ContinuousTests.Tests
var dl = Nodes[0].DownloadContent(cid); var dl = Nodes[0].DownloadContent(cid);
file.AssertIsEqual(dl); file.AssertIsEqual(dl);
var targetFile = Log.CreateSubfile();
var downloader = new ElasticSearchLogDownloader(Tools, Log);
downloader.Download(targetFile, Nodes[0].Container, DateTime.UtcNow.Subtract(TimeSpan.FromMinutes(1)), DateTime.UtcNow.AddMinutes(1));
} }
} }
} }