From b0610393afb37ff421a6734fc9250c66257e02b9 Mon Sep 17 00:00:00 2001 From: benbierens Date: Sun, 8 Oct 2023 19:11:31 +0200 Subject: [PATCH] rigged for twoclient test with full container log download --- Tests/CodexContinuousTests/Configuration.cs | 4 ++++ Tests/CodexContinuousTests/SingleTestRun.cs | 4 ++++ Tests/CodexContinuousTests/deploy-and-run.sh | 13 ++++++++----- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/Tests/CodexContinuousTests/Configuration.cs b/Tests/CodexContinuousTests/Configuration.cs index ba4d9aa..3e51d92 100644 --- a/Tests/CodexContinuousTests/Configuration.cs +++ b/Tests/CodexContinuousTests/Configuration.cs @@ -33,6 +33,10 @@ namespace ContinuousTests [Uniform("cleanup", "cl", "CLEANUP", false, "If set to 1 or 'true', the kubernetes namespace will be deleted after the test run has finished.")] public bool Cleanup { get; set; } = false; + [Uniform("full-container-logs", "fcl", "FULLCONTAINERLOGS", false, "If set to 1 or 'true', container logs downloaded on test failure will download from" + + " the timestamp of the start of the network deployment. Otherwise, logs will start from the test start timestamp.")] + public bool FullContainerLogs { get; set; } = false; + public CodexDeployment CodexDeployment { get; set; } = null!; } diff --git a/Tests/CodexContinuousTests/SingleTestRun.cs b/Tests/CodexContinuousTests/SingleTestRun.cs index 72586ae..ad54dd5 100644 --- a/Tests/CodexContinuousTests/SingleTestRun.cs +++ b/Tests/CodexContinuousTests/SingleTestRun.cs @@ -104,6 +104,10 @@ namespace ContinuousTests Thread.Sleep(TimeSpan.FromMinutes(1)); var effectiveStart = testStart.Subtract(TimeSpan.FromSeconds(30)); + if (config.FullContainerLogs) + { + effectiveStart = config.CodexDeployment.Metadata.DeployDateTimeUtc.Subtract(TimeSpan.FromSeconds(30)); + } var effectiveEnd = DateTime.UtcNow; var elasticSearchLogDownloader = new ElasticSearchLogDownloader(entryPoint.Tools, fixtureLog); diff --git a/Tests/CodexContinuousTests/deploy-and-run.sh b/Tests/CodexContinuousTests/deploy-and-run.sh index e98a93a..130c534 100644 --- a/Tests/CodexContinuousTests/deploy-and-run.sh +++ b/Tests/CodexContinuousTests/deploy-and-run.sh @@ -1,6 +1,6 @@ set -e -replication=10 +replication=5 echo "Deploying..." cd ../../Tools/CodexNetDeployer @@ -13,14 +13,14 @@ do --nodes=5 \ --validators=3 \ --log-level=Trace \ - --storage-quota=2048 \ + --storage-quota=20480 \ --storage-sell=1024 \ --min-price=1024 \ --max-collateral=1024 \ --max-duration=3600000 \ - --block-ttl=180 \ - --block-mi=120 \ - --block-mn=10000 \ + --block-ttl=99999999 \ + --block-mi=99999999 \ + --block-mn=100 \ --metrics=1 \ --check-connect=1 \ -y @@ -38,5 +38,8 @@ do --data-path=data-$i \ --keep=1 \ --stop=1 \ + --filter=TwoClient \ + --cleanup=1 \ + --full-container-logs=1 \ --target-duration=172800 # 48 hours done