mirror of
https://github.com/logos-storage/logos-storage-nim-cs-dist-tests.git
synced 2026-02-24 06:53:07 +00:00
Merge branch 'master' into feature/extended-marketplace-testing
# Conflicts: # Tests/CodexReleaseTests/Parallelism.cs
This commit is contained in:
commit
0e66e8e94a
@ -14,6 +14,7 @@ namespace KubernetesWorkflow
|
||||
private CancellationTokenSource cts;
|
||||
private Task? worker;
|
||||
private Exception? workerException;
|
||||
private bool hasCrashed = false;
|
||||
|
||||
public ContainerCrashWatcher(ILog log, KubernetesClientConfiguration config, string containerName, string podName, string recipeName, string k8sNamespace)
|
||||
{
|
||||
@ -47,10 +48,7 @@ namespace KubernetesWorkflow
|
||||
|
||||
public bool HasCrashed()
|
||||
{
|
||||
using var client = new Kubernetes(config);
|
||||
var result = HasContainerBeenRestarted(client);
|
||||
if (result) DownloadCrashedContainerLogs(client);
|
||||
return result;
|
||||
return hasCrashed;
|
||||
}
|
||||
|
||||
private void Worker()
|
||||
@ -72,6 +70,9 @@ namespace KubernetesWorkflow
|
||||
{
|
||||
if (HasContainerBeenRestarted(client))
|
||||
{
|
||||
hasCrashed = true;
|
||||
cts.Cancel();
|
||||
|
||||
DownloadCrashedContainerLogs(client);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -205,6 +205,7 @@ components:
|
||||
required:
|
||||
- id
|
||||
- totalRemainingCollateral
|
||||
- freeSize
|
||||
allOf:
|
||||
- $ref: "#/components/schemas/SalesAvailability"
|
||||
- type: object
|
||||
@ -627,6 +628,26 @@ paths:
|
||||
"500":
|
||||
description: Well it was bad-bad
|
||||
|
||||
delete:
|
||||
summary: "Deletes either a single block or an entire dataset from the local node."
|
||||
tags: [Data]
|
||||
operationId: deleteLocal
|
||||
parameters:
|
||||
- in: path
|
||||
name: cid
|
||||
required: true
|
||||
schema:
|
||||
$ref: "#/components/schemas/Cid"
|
||||
description: Block or dataset to be deleted.
|
||||
|
||||
responses:
|
||||
"204":
|
||||
description: Data was successfully deleted.
|
||||
"400":
|
||||
description: Invalid CID is specified
|
||||
"500":
|
||||
description: There was an error during deletion
|
||||
|
||||
"/data/{cid}/network":
|
||||
post:
|
||||
summary: "Download a file from the network to the local node if it's not available locally. Note: Download is performed async. Call can return before download is completed."
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
using CodexContractsPlugin.Marketplace;
|
||||
using System.Collections.Generic;
|
||||
using Utils;
|
||||
|
||||
namespace CodexContractsPlugin.ChainMonitor
|
||||
|
||||
@ -10,7 +10,7 @@ namespace CodexPlugin
|
||||
public class ApiChecker
|
||||
{
|
||||
// <INSERT-OPENAPI-YAML-HASH>
|
||||
private const string OpenApiYamlHash = "06-B9-41-E8-C8-6C-DE-01-86-83-F3-9A-E4-AC-E7-30-D9-E6-64-60-E0-21-81-9E-4E-C5-93-77-2C-71-79-14";
|
||||
private const string OpenApiYamlHash = "2F-9D-82-3C-F0-2F-D3-C9-72-C3-F2-6E-BD-C3-63-F5-67-62-D1-03-B6-60-75-31-22-DF-3F-63-A2-8D-AA-4B";
|
||||
private const string OpenApiFilePath = "/codex/openapi.yaml";
|
||||
private const string DisableEnvironmentVariable = "CODEXPLUGIN_DISABLE_APICHECK";
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
using NUnit.Framework;
|
||||
|
||||
[assembly: LevelOfParallelism(1)]
|
||||
namespace CodexReleaseTests.DataTests
|
||||
[assembly: LevelOfParallelism(2)]
|
||||
namespace CodexReleaseTests
|
||||
{
|
||||
}
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using System.Reflection;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
using Core;
|
||||
using Logging;
|
||||
|
||||
@ -33,7 +34,9 @@ namespace DistTestCore
|
||||
{
|
||||
try
|
||||
{
|
||||
Stopwatch.Measure(log, "Global setup", () =>
|
||||
Trace.Listeners.Add(new ConsoleTraceListener());
|
||||
|
||||
Logging.Stopwatch.Measure(log, "Global setup", () =>
|
||||
{
|
||||
globalEntryPoint.Announce();
|
||||
globalEntryPoint.Tools.CreateWorkflow().DeleteNamespacesStartingWith(TestNamespacePrefix, wait: true);
|
||||
@ -55,6 +58,8 @@ namespace DistTestCore
|
||||
deleteTrackedFiles: true,
|
||||
waitTillDone: true
|
||||
);
|
||||
|
||||
Trace.Flush();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -59,24 +59,8 @@ namespace DistTestCore.Logs
|
||||
|
||||
protected static ILog CreateMainLog(string fullName, string name)
|
||||
{
|
||||
ILog log = new FileLog(fullName);
|
||||
log = ApplyConsoleOutput(log);
|
||||
return log;
|
||||
}
|
||||
|
||||
private static ILog ApplyConsoleOutput(ILog log)
|
||||
{
|
||||
// If we're running as a release test, we'll split the log output
|
||||
// to the console as well.
|
||||
|
||||
var testType = Environment.GetEnvironmentVariable("TEST_TYPE");
|
||||
if (string.IsNullOrEmpty(testType) || testType.ToLowerInvariant() != "release-tests")
|
||||
{
|
||||
return log;
|
||||
}
|
||||
|
||||
return new LogSplitter(
|
||||
log,
|
||||
new FileLog(fullName),
|
||||
new ConsoleLog()
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user