Adds test-type to STATUS log jsons.
This commit is contained in:
parent
096282ae1a
commit
b78f527c39
|
@ -28,7 +28,7 @@ namespace ContinuousTests
|
|||
new FixtureLog(logConfig, startTime, "Overview"),
|
||||
new ConsoleLog()
|
||||
);
|
||||
var statusLog = new StatusLog(logConfig, startTime, "ContinuousTestRun");
|
||||
var statusLog = new StatusLog(logConfig, startTime, "continuous-tests", "ContinuousTestRun");
|
||||
|
||||
overviewLog.Log("Initializing...");
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace DistTestCore
|
|||
var logConfig = configuration.GetLogConfig();
|
||||
var startTime = DateTime.UtcNow;
|
||||
fixtureLog = new FixtureLog(logConfig, startTime);
|
||||
statusLog = new StatusLog(logConfig, startTime);
|
||||
statusLog = new StatusLog(logConfig, startTime, "dist-tests");
|
||||
|
||||
globalEntryPoint = new EntryPoint(fixtureLog, configuration.GetK8sConfiguration(new DefaultTimeSet(), TestNamespacePrefix), configuration.GetFileManagerFolder());
|
||||
|
||||
|
|
|
@ -8,11 +8,13 @@ namespace DistTestCore.Logs
|
|||
private readonly object fileLock = new object();
|
||||
private readonly string fullName;
|
||||
private readonly string fixtureName;
|
||||
private readonly string testType;
|
||||
|
||||
public StatusLog(LogConfig config, DateTime start, string name = "")
|
||||
public StatusLog(LogConfig config, DateTime start, string testType, string name = "")
|
||||
{
|
||||
fullName = NameUtils.GetFixtureFullName(config, start, name) + "_STATUS.log";
|
||||
fixtureName = NameUtils.GetRawFixtureName();
|
||||
this.testType = testType;
|
||||
}
|
||||
|
||||
public void ConcludeTest(string resultStatus, string testDuration, Dictionary<string, string> data)
|
||||
|
@ -20,10 +22,11 @@ namespace DistTestCore.Logs
|
|||
data.Add("timestamp", DateTime.UtcNow.ToString("o"));
|
||||
data.Add("runid", NameUtils.GetRunId());
|
||||
data.Add("status", resultStatus);
|
||||
data.Add("testid", NameUtils.GetTestId());
|
||||
data.Add("category", NameUtils.GetCategoryName());
|
||||
data.Add("fixturename", fixtureName);
|
||||
data.Add("testid", NameUtils.GetTestId());
|
||||
data.Add("testname", NameUtils.GetTestMethodName());
|
||||
data.Add("testtype", testType);
|
||||
data.Add("testduration", testDuration);
|
||||
Write(data);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue