Requires profiler branch image for release tests

This commit is contained in:
Ben 2025-05-14 13:40:40 +02:00
parent 5e62c3520c
commit e9bd1a2521
No known key found for this signature in database
GPG Key ID: 0F16E812E736C24B
3 changed files with 25 additions and 1 deletions

View File

@ -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)
{

View File

@ -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;

View 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");
}
}
}