mirror of
https://github.com/logos-storage/logos-storage-nim-cs-dist-tests.git
synced 2026-08-06 22:23:13 +00:00
Requires profiler branch image for release tests
This commit is contained in:
parent
5e62c3520c
commit
e9bd1a2521
@ -12,6 +12,8 @@ namespace CodexPlugin
|
||||
public const string MetricsPortTag = "codex_metrics_port";
|
||||
public const string DiscoveryPortTag = "codex_discovery_port";
|
||||
|
||||
public const string ProfilerExecTimeThreshold = "0.2s";
|
||||
|
||||
// Used by tests for time-constraint assertions.
|
||||
public static readonly TimeSpan MaxUploadTimePerMegabyte = TimeSpan.FromSeconds(2.0);
|
||||
public static readonly TimeSpan MaxDownloadTimePerMegabyte = TimeSpan.FromSeconds(2.0);
|
||||
@ -46,6 +48,7 @@ namespace CodexPlugin
|
||||
var discPort = CreateDiscoveryPort(config);
|
||||
AddEnvVar("CODEX_DISC_PORT", discPort);
|
||||
AddEnvVar("CODEX_LOG_LEVEL", config.LogLevelWithTopics());
|
||||
AddEnvVar("CODEX_EXEC_TIME_THRESHOLD", ProfilerExecTimeThreshold);
|
||||
|
||||
if (config.PublicTestNet != null)
|
||||
{
|
||||
|
||||
@ -2,7 +2,8 @@
|
||||
{
|
||||
public class CodexDockerImage
|
||||
{
|
||||
private const string DefaultDockerImage = "codexstorage/nim-codex:latest-dist-tests";
|
||||
private const string DefaultDockerImage =
|
||||
"codexstorage/nim-codex:sha-49bb3d3-dist-tests";
|
||||
|
||||
public static string Override { get; set; } = string.Empty;
|
||||
|
||||
|
||||
20
Tests/CodexReleaseTests/NodeTests/ProfilerCheckTest.cs
Normal file
20
Tests/CodexReleaseTests/NodeTests/ProfilerCheckTest.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using CodexTests;
|
||||
using DistTestCore;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace CodexReleaseTests.NodeTests
|
||||
{
|
||||
[TestFixture]
|
||||
public class ProfilerCheckTest : CodexDistTest
|
||||
{
|
||||
[Test]
|
||||
public void IsProfilingImage()
|
||||
{
|
||||
var node = StartCodex();
|
||||
var log = node.DownloadLog();
|
||||
node.Stop(waitTillStopped: false);
|
||||
|
||||
log.AssertLogContains("Enabling profiling");
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user