feat: owner review 2 phase 2: scheduled jobs and log settings (#10)
CI / Build and test (push) Successful in 7m0s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 6s
Release / Build, test and publish (push) Successful in 13m28s
CI / PostgreSQL 16 integration (push) Successful in 5m52s
CI / PostgreSQL 17 integration (push) Successful in 4m50s
CI / Docker image (push) Successful in 1m4s
Release / Server image (push) Successful in 1m35s
CI / Build and test (push) Successful in 7m0s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 6s
Release / Build, test and publish (push) Successful in 13m28s
CI / PostgreSQL 16 integration (push) Successful in 5m52s
CI / PostgreSQL 17 integration (push) Successful in 4m50s
CI / Docker image (push) Successful in 1m4s
Release / Server image (push) Successful in 1m35s
- Jobs > Scheduled on the desktop and the admin panel. Every timer that queued work is now a visible system schedule: archive scan, upload clean-up, index backup, job-history and audit clean-ups, desktop housekeeping. New actions: verify, thumbnails, proxies, analysis, maintenance, backup, clean-ups, reports. - The scheduler: migration 0007, in-house recurrence, compare-and-set claim, catch-up, scan at start. - Log settings: levels, retention, size parts, total limit, daily or hourly rotation, audit retention, diagnostics share; the server writes Debug/Trace to its files again; logging never fails a job. Upgrade: CHRONOS_LOG_LEVEL set in an existing container locks both levels; migration 0007 is one-way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Alberto Balbo <alberto.balbo.96@gmail.com>
This commit was merged in pull request #10.
This commit is contained in:
1 parent
1f089888e8
commit
af9eeaab9b
349 files changed
+28341
-1304
No files matched your search
@@ -0,0 +1,195 @@
|
||||
using System.Net;
|
||||
using System.Net.Http.Json;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Nodes;
|
||||
using System.Text.RegularExpressions;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Chronos.Core.Diagnostics;
|
||||
using Chronos.Protocol;
|
||||
using Chronos.Server.Configuration;
|
||||
using Chronos.Server.Hosting;
|
||||
using Chronos.Server.Storage;
|
||||
using Chronos.Testing;
|
||||
using CoreLog = Chronos.Core.Diagnostics.Log;
|
||||
using LogLevel = Microsoft.Extensions.Logging.LogLevel;
|
||||
|
||||
namespace Chronos.Server.Tests.Hosting;
|
||||
|
||||
/// <summary>
|
||||
/// The server's log settings (owner review 2, R11). Serial: the engine's <see cref="CoreLog"/> is one per process, its
|
||||
/// sink the last server's started and its level the lower of that server's two.
|
||||
/// </summary>
|
||||
[Category("server")]
|
||||
[Serial]
|
||||
public sealed partial class LoggingTests(TestContext context)
|
||||
{
|
||||
[Test]
|
||||
public async Task DebugLinesReachTheFilesWhenTheLevelAsksForThem()
|
||||
{
|
||||
// The files' logger stopped at Information whatever CHRONOS_LOG_LEVEL said.
|
||||
var root = context.CreateTempDirectory("debug-variable");
|
||||
var variable = ServerOptions.Load(new Dictionary<string, string?> { ["CHRONOS_DATA_PATH"] = root, ["CHRONOS_DB"] = "postgres", ["CHRONOS_LOG_LEVEL"] = "Debug" });
|
||||
Assert.Equal((LogLevel.Debug, LogLevel.Debug), (variable.LogLevel, variable.ConsoleLogLevel));
|
||||
|
||||
// The console stays at Warning, so the test log stays readable: the files have their own level.
|
||||
await using var server = await TestServer.StartAsync(context, o => o.LogLevel = variable.LogLevel);
|
||||
var marker = Guid.NewGuid().ToString("N");
|
||||
var logger = server.Services.GetRequiredService<ILoggerFactory>().CreateLogger("Chronos.Server.Tests");
|
||||
logger.LogDebug("debug {Marker}", marker);
|
||||
logger.LogTrace("trace {Marker}", marker);
|
||||
CoreLog.Debug("tests", "engine debug " + marker);
|
||||
// ASP.NET Core's own lines stay at Warning and above.
|
||||
server.Services.GetRequiredService<ILoggerFactory>().CreateLogger("Microsoft.AspNetCore.Routing").LogDebug("routing {Marker}", marker);
|
||||
|
||||
var text = Logs(server);
|
||||
Assert.Contains("Debug Chronos.Server.Tests: debug " + marker, text);
|
||||
Assert.Contains("Debug Chronos.tests: engine debug " + marker, text);
|
||||
Assert.False(text.Contains("trace " + marker, StringComparison.Ordinal), "Trace is below Debug");
|
||||
Assert.False(text.Contains("routing " + marker, StringComparison.Ordinal), "request lines stay out");
|
||||
var logging = server.Services.GetRequiredService<ServerLogging>();
|
||||
Assert.Equal((LogLevel.Debug, LogLevel.Warning, Chronos.Core.Diagnostics.LogLevel.Debug), (logging.FileLevel, logging.ConsoleLevel, CoreLog.MinimumLevel));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task TheFileLevelChangesWhileTheServerRuns()
|
||||
{
|
||||
await using var server = await TestServer.StartAsync(context, o => o.LogLevel = LogLevel.Debug);
|
||||
var admin = await server.AdminAsync();
|
||||
var logger = server.Services.GetRequiredService<ILoggerFactory>().CreateLogger("Chronos.Server.Tests");
|
||||
var marker = Guid.NewGuid().ToString("N");
|
||||
logger.LogDebug("before {Marker}", marker);
|
||||
|
||||
var settings = await SettingsAsync(admin);
|
||||
Assert.Equal(("debug", "warning"), (settings.Logs.FileLevel, settings.Logs.ConsoleLevel));
|
||||
// The test server listens on ports the system chose (0), which no request may set.
|
||||
var edited = settings with { HttpPort = 18080, HttpsPort = 18443, Logs = settings.Logs with { FileLevel = "information" } };
|
||||
using (var saved = await admin.PutAsJsonAsync("/api/v1/server/settings", edited, ProtocolJson.Default.ServerSettingsDto))
|
||||
Assert.Equal("information", (await saved.ReadAsync(ProtocolJson.Default.ServerSettingsDto)).Logs.FileLevel);
|
||||
|
||||
logger.LogDebug("after {Marker}", marker);
|
||||
CoreLog.Debug("tests", "engine after " + marker);
|
||||
logger.LogInformation("information {Marker}", marker);
|
||||
var text = Logs(server);
|
||||
Assert.Contains("before " + marker, text);
|
||||
Assert.Contains("information " + marker, text);
|
||||
Assert.False(text.Contains("after " + marker, StringComparison.Ordinal), "Debug stopped at once");
|
||||
Assert.Equal((LogLevel.Information, Chronos.Core.Diagnostics.LogLevel.Info), (server.Options.LogLevel, CoreLog.MinimumLevel));
|
||||
var file = JsonNode.Parse(await File.ReadAllTextAsync(server.Options.SettingsFile))!.AsObject();
|
||||
Assert.Equal("Information", file["LogLevel"]!.GetValue<string>());
|
||||
Assert.False(file.ContainsKey("ConsoleLogLevel"), "only what changed is written");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task LogSettingsAreSavedAppliedAndValidated()
|
||||
{
|
||||
// With the archive module: its audit step is what the audit retention, the audit clean-up's age limit, deletes with.
|
||||
await using var server = await TestServer.StartAsync(context, services: ArchiveModule.Register);
|
||||
var admin = await server.AdminAsync();
|
||||
var settings = await SettingsAsync(admin);
|
||||
Assert.Equal(new LogSettingsDto("warning", "warning", 14, 50, 1024, "daily", 0, 4), settings.Logs);
|
||||
|
||||
var edited = settings with { HttpPort = 18080, HttpsPort = 18443, Logs = new LogSettingsDto("Debug", "error", 30, 10, 200, "Hourly", 365, 8) };
|
||||
using (var saved = await admin.PutAsJsonAsync("/api/v1/server/settings", edited, ProtocolJson.Default.ServerSettingsDto))
|
||||
Assert.Equal(new LogSettingsDto("debug", "error", 30, 10, 200, "hourly", 365, 8), (await saved.ReadAsync(ProtocolJson.Default.ServerSettingsDto)).Logs);
|
||||
var o = server.Options;
|
||||
Assert.Equal((LogLevel.Debug, LogLevel.Error, 30, 10, 200), (o.LogLevel, o.ConsoleLogLevel, o.LogRetentionDays, o.LogMaxFileMb, o.LogMaxTotalMb));
|
||||
Assert.Equal((LogRotation.Hourly, 365, 8), (o.LogRotation, o.AuditRetentionDays, o.DiagnosticsLogMb));
|
||||
var logging = server.Services.GetRequiredService<ServerLogging>();
|
||||
Assert.Equal(new LogFileOptions { Level = Chronos.Core.Diagnostics.LogLevel.Debug, RetentionDays = 30, MaxFileMb = 10, MaxTotalMb = 200, Rotation = LogRotation.Hourly },
|
||||
logging.Sink.Options);
|
||||
Assert.Equal((LogLevel.Debug, LogLevel.Error), (logging.FileLevel, logging.ConsoleLevel));
|
||||
|
||||
// Without a restart, the next line goes to an hourly file.
|
||||
var marker = Guid.NewGuid().ToString("N");
|
||||
server.Services.GetRequiredService<ILoggerFactory>().CreateLogger("Chronos.Server.Tests").LogWarning("hourly {Marker}", marker);
|
||||
Assert.True(Directory.EnumerateFiles(o.LogPath).Any(f => HourlyName().IsMatch(Path.GetFileName(f)) && Read(f).Contains(marker, StringComparison.Ordinal)),
|
||||
"an hourly file holds the line");
|
||||
|
||||
// server.json takes the names it reads back at the next start.
|
||||
var file = JsonNode.Parse(await File.ReadAllTextAsync(o.SettingsFile))!.AsObject();
|
||||
Assert.Equal(("Debug", "Error", "Hourly", 30, 365), (file["LogLevel"]!.GetValue<string>(), file["ConsoleLogLevel"]!.GetValue<string>(),
|
||||
file["LogRotation"]!.GetValue<string>(), file["LogRetentionDays"]!.GetValue<int>(), file["AuditRetentionDays"]!.GetValue<int>()));
|
||||
var restarted = ServerOptions.Load(new Dictionary<string, string?> { ["CHRONOS_DATA_PATH"] = o.DataPath, ["CHRONOS_DB"] = "postgres" });
|
||||
Assert.Equal((LogLevel.Debug, LogLevel.Error, LogRotation.Hourly, 10, 200, 8), (restarted.LogLevel, restarted.ConsoleLogLevel, restarted.LogRotation,
|
||||
restarted.LogMaxFileMb, restarted.LogMaxTotalMb, restarted.DiagnosticsLogMb));
|
||||
|
||||
// A panel that knows no log group keeps them as they are.
|
||||
var older = JsonSerializer.SerializeToNode(edited with { ServerName = "Older panel" }, ProtocolJson.Default.ServerSettingsDto)!.AsObject();
|
||||
Assert.True(older.Remove("logs"));
|
||||
using (var content = new StringContent(older.ToJsonString(), Encoding.UTF8, "application/json"))
|
||||
using (var saved = await admin.PutAsync("/api/v1/server/settings", content))
|
||||
Assert.Equal(new LogSettingsDto("debug", "error", 30, 10, 200, "hourly", 365, 8), (await saved.ReadAsync(ProtocolJson.Default.ServerSettingsDto)).Logs);
|
||||
|
||||
var logs = edited.Logs;
|
||||
foreach (var (invalid, setting) in new (LogSettingsDto, string)[]
|
||||
{
|
||||
(logs with { FileLevel = "verbose" }, "LogLevel"),
|
||||
(logs with { ConsoleLevel = "3" }, "ConsoleLogLevel"),
|
||||
(logs with { Rotation = "weekly" }, "LogRotation"),
|
||||
(logs with { RetentionDays = 0 }, "LogRetentionDays"),
|
||||
(logs with { MaxFileMb = -1 }, "LogMaxFileMb"),
|
||||
(logs with { MaxFileMb = 300 }, "LogMaxTotalMb"),
|
||||
(logs with { MaxTotalMb = -5 }, "LogMaxTotalMb"),
|
||||
(logs with { AuditRetentionDays = -1 }, "AuditRetentionDays"),
|
||||
(logs with { DiagnosticsLogMb = 0 }, "DiagnosticsLogMb"),
|
||||
})
|
||||
{
|
||||
using var refused = await admin.PutAsJsonAsync("/api/v1/server/settings", edited with { Logs = invalid }, ProtocolJson.Default.ServerSettingsDto);
|
||||
Assert.Equal(setting, (await refused.ExpectErrorAsync(HttpStatusCode.BadRequest, "invalid_setting")).Details);
|
||||
}
|
||||
// No limits at all are a choice too.
|
||||
using (var unlimited = await admin.PutAsJsonAsync("/api/v1/server/settings", edited with { Logs = logs with { MaxFileMb = 0, MaxTotalMb = 0 } },
|
||||
ProtocolJson.Default.ServerSettingsDto))
|
||||
await unlimited.ExpectAsync(HttpStatusCode.OK);
|
||||
Assert.Equal((0, 0), (logging.Sink.Options.MaxFileMb, logging.Sink.Options.MaxTotalMb));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task LevelsSetByTheEnvironmentAreLocked()
|
||||
{
|
||||
// An install upgraded with the earlier compose file or Unraid template: CHRONOS_LOG_LEVEL fixes both levels.
|
||||
await using var server = await TestServer.StartAsync(context, o =>
|
||||
{
|
||||
o.Locked = [nameof(ServerOptions.LogLevel), nameof(ServerOptions.ConsoleLogLevel), nameof(ServerOptions.LogRotation)];
|
||||
o.LockedBy = new Dictionary<string, string> { [nameof(ServerOptions.LogLevel)] = "CHRONOS_LOG_LEVEL", [nameof(ServerOptions.ConsoleLogLevel)] = "CHRONOS_LOG_LEVEL" };
|
||||
});
|
||||
var admin = await server.AdminAsync();
|
||||
var settings = await SettingsAsync(admin);
|
||||
Assert.Contains("ConsoleLogLevel", settings.Locked);
|
||||
// The panel's tooltip names the variable that fixes each; one locked without it is named by the variable that would.
|
||||
string[] lockedBy = ["ConsoleLogLevel=CHRONOS_LOG_LEVEL", "LogLevel=CHRONOS_LOG_LEVEL", "LogRotation=CHRONOS_LOG_ROTATION"];
|
||||
Assert.SequenceEqual(lockedBy, settings.LockedBy.Select(l => $"{l.Key}={l.Value}").Order(StringComparer.Ordinal));
|
||||
var edited = settings with { HttpPort = 18080, HttpsPort = 18443 };
|
||||
using (var refused = await admin.PutAsJsonAsync("/api/v1/server/settings", edited with { Logs = edited.Logs with { ConsoleLevel = "debug" } },
|
||||
ProtocolJson.Default.ServerSettingsDto))
|
||||
Assert.Equal("ConsoleLogLevel", (await refused.ExpectErrorAsync(HttpStatusCode.Conflict, "setting_locked")).Details);
|
||||
Assert.Equal(LogLevel.Warning, server.Options.ConsoleLogLevel);
|
||||
// The settings no variable fixes still save.
|
||||
// What a request says about the locks is ignored.
|
||||
using (var saved = await admin.PutAsJsonAsync("/api/v1/server/settings",
|
||||
edited with { Logs = edited.Logs with { RetentionDays = 7 }, LockedBy = new Dictionary<string, string>() }, ProtocolJson.Default.ServerSettingsDto))
|
||||
Assert.SequenceEqual(lockedBy, (await saved.ReadAsync(ProtocolJson.Default.ServerSettingsDto)).LockedBy.Select(l => $"{l.Key}={l.Value}").Order(StringComparer.Ordinal));
|
||||
Assert.Equal(7, server.Options.LogRetentionDays);
|
||||
}
|
||||
|
||||
private static async Task<ServerSettingsDto> SettingsAsync(HttpClient admin)
|
||||
{
|
||||
using var read = await admin.GetAsync("/api/v1/server/settings");
|
||||
return await read.ReadAsync(ProtocolJson.Default.ServerSettingsDto);
|
||||
}
|
||||
|
||||
/// <summary>Every server log file, read beside the sink that may still be writing it.</summary>
|
||||
private static string Logs(TestServer server) => string.Concat(Directory.EnumerateFiles(server.Options.LogPath, "server-*.log").Order(StringComparer.Ordinal).Select(Read));
|
||||
|
||||
private static string Read(string path)
|
||||
{
|
||||
using var stream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
|
||||
using var reader = new StreamReader(stream);
|
||||
return reader.ReadToEnd();
|
||||
}
|
||||
|
||||
[GeneratedRegex(@"^server-\d{8}-\d{2}(\.\d+)?\.log$")]
|
||||
private static partial Regex HourlyName();
|
||||
}
|
||||
@@ -72,6 +72,8 @@ public sealed class StartupTests(TestContext context)
|
||||
["CHRONOS_DISCOVERY"] = "false",
|
||||
});
|
||||
Assert.SequenceEqual(["Database", "HttpPort", "Discovery"], options.Locked);
|
||||
// The admin panel names the variable that fixes each of them.
|
||||
Assert.Equal(("CHRONOS_DB", "CHRONOS_HTTP_PORT", "CHRONOS_DISCOVERY"), (options.LockedBy["Database"], options.LockedBy["HttpPort"], options.LockedBy["Discovery"]));
|
||||
Assert.Throws<InvalidOperationException>(() => ServerOptions.Load(new Dictionary<string, string?> { ["CHRONOS_DATA_PATH"] = root, ["CHRONOS_DB"] = "postgres", ["CHRONOS_WORKERS"] = "many" }));
|
||||
}
|
||||
|
||||
@@ -86,6 +88,7 @@ public sealed class StartupTests(TestContext context)
|
||||
var former = ServerOptions.Load(new Dictionary<string, string?> { ["CHRONOS_DATA_PATH"] = root, ["CHRONOS_DB"] = "postgres", ["CHRONOS_WORKERS"] = "5" });
|
||||
Assert.Equal((5, true), (former.Parallelism, former.FormerWorkersVariable));
|
||||
Assert.SequenceEqual(["Database", "Parallelism"], former.Locked);
|
||||
Assert.Equal("CHRONOS_WORKERS", former.LockedBy["Parallelism"]);
|
||||
var both = ServerOptions.Load(new Dictionary<string, string?>
|
||||
{
|
||||
["CHRONOS_DATA_PATH"] = root,
|
||||
@@ -96,6 +99,7 @@ public sealed class StartupTests(TestContext context)
|
||||
});
|
||||
Assert.Equal((7, true), (both.Parallelism, both.PriorityQueue));
|
||||
Assert.SequenceEqual(["Database", "Parallelism", "PriorityQueue"], both.Locked);
|
||||
Assert.Equal("CHRONOS_PARALLELISM", both.LockedBy["Parallelism"]);
|
||||
Assert.False(ServerOptions.Load(new Dictionary<string, string?> { ["CHRONOS_DATA_PATH"] = root, ["CHRONOS_DB"] = "postgres", ["CHRONOS_PARALLELISM"] = "2" })
|
||||
.FormerWorkersVariable);
|
||||
Assert.Throws<InvalidOperationException>(() => ServerOptions.Load(new Dictionary<string, string?> { ["CHRONOS_DATA_PATH"] = root, ["CHRONOS_DB"] = "postgres", ["CHRONOS_PRIORITY_QUEUE"] = "often" }));
|
||||
@@ -154,6 +158,48 @@ public sealed class StartupTests(TestContext context)
|
||||
Assert.Throws<InvalidOperationException>(() => ServerOptions.Load(new Dictionary<string, string?> { ["CHRONOS_DATA_PATH"] = root, ["CHRONOS_DB"] = "postgres", ["CHRONOS_PUBLIC_HTTPS_PORT"] = invalid }));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TheLogVariablesSetTheirSettingsAndLockThem()
|
||||
{
|
||||
// Owner review 2, R11: CHRONOS_LOG_LEVEL sets the files and the console, CHRONOS_LOG_CONSOLE_LEVEL the console alone.
|
||||
var root = context.CreateTempDirectory("log-variables");
|
||||
Dictionary<string, string?> Env(params (string Name, string Value)[] variables)
|
||||
{
|
||||
var env = new Dictionary<string, string?> { ["CHRONOS_DATA_PATH"] = root, ["CHRONOS_DB"] = "postgres" };
|
||||
foreach (var (name, value) in variables) env[name] = value;
|
||||
return env;
|
||||
}
|
||||
|
||||
var defaults = ServerOptions.Load(Env());
|
||||
Assert.Equal((Microsoft.Extensions.Logging.LogLevel.Information, Microsoft.Extensions.Logging.LogLevel.Information, 14, 50, 1024),
|
||||
(defaults.LogLevel, defaults.ConsoleLogLevel, defaults.LogRetentionDays, defaults.LogMaxFileMb, defaults.LogMaxTotalMb));
|
||||
Assert.Equal((Chronos.Core.Diagnostics.LogRotation.Daily, 0, 4), (defaults.LogRotation, defaults.AuditRetentionDays, defaults.DiagnosticsLogMb));
|
||||
|
||||
var both = ServerOptions.Load(Env(("CHRONOS_LOG_LEVEL", "debug")));
|
||||
Assert.Equal((Microsoft.Extensions.Logging.LogLevel.Debug, Microsoft.Extensions.Logging.LogLevel.Debug), (both.LogLevel, both.ConsoleLogLevel));
|
||||
Assert.SequenceEqual(["Database", "LogLevel", "ConsoleLogLevel"], both.Locked);
|
||||
// The earlier compose file and Unraid template set CHRONOS_LOG_LEVEL: the panel names it on both levels.
|
||||
Assert.Equal(("CHRONOS_LOG_LEVEL", "CHRONOS_LOG_LEVEL"), (both.LockedBy["LogLevel"], both.LockedBy["ConsoleLogLevel"]));
|
||||
|
||||
var all = ServerOptions.Load(Env(("CHRONOS_LOG_LEVEL", "Trace"), ("CHRONOS_LOG_CONSOLE_LEVEL", "warn"), ("CHRONOS_LOG_RETENTION_DAYS", "30"),
|
||||
("CHRONOS_LOG_MAX_FILE_MB", "0"), ("CHRONOS_LOG_MAX_TOTAL_MB", "2048"), ("CHRONOS_LOG_ROTATION", "Hourly"), ("CHRONOS_AUDIT_RETENTION_DAYS", "365"),
|
||||
("CHRONOS_DIAGNOSTICS_LOG_MB", "16")));
|
||||
Assert.Equal((Microsoft.Extensions.Logging.LogLevel.Trace, Microsoft.Extensions.Logging.LogLevel.Warning, 30, 0, 2048),
|
||||
(all.LogLevel, all.ConsoleLogLevel, all.LogRetentionDays, all.LogMaxFileMb, all.LogMaxTotalMb));
|
||||
Assert.Equal((Chronos.Core.Diagnostics.LogRotation.Hourly, 365, 16), (all.LogRotation, all.AuditRetentionDays, all.DiagnosticsLogMb));
|
||||
Assert.SequenceEqual(["Database", "LogLevel", "ConsoleLogLevel", "LogRetentionDays", "LogMaxFileMb", "LogMaxTotalMb", "LogRotation", "AuditRetentionDays",
|
||||
"DiagnosticsLogMb"], all.Locked);
|
||||
Assert.Equal(("CHRONOS_LOG_LEVEL", "CHRONOS_LOG_CONSOLE_LEVEL"), (all.LockedBy["LogLevel"], all.LockedBy["ConsoleLogLevel"]));
|
||||
|
||||
foreach (var invalid in new[]
|
||||
{
|
||||
("CHRONOS_LOG_LEVEL", "verbose"), ("CHRONOS_LOG_LEVEL", "2"), ("CHRONOS_LOG_CONSOLE_LEVEL", "loud"), ("CHRONOS_LOG_ROTATION", "weekly"),
|
||||
("CHRONOS_LOG_RETENTION_DAYS", "0"), ("CHRONOS_LOG_MAX_FILE_MB", "-1"), ("CHRONOS_LOG_MAX_TOTAL_MB", "10"), ("CHRONOS_AUDIT_RETENTION_DAYS", "-1"),
|
||||
("CHRONOS_DIAGNOSTICS_LOG_MB", "0"),
|
||||
})
|
||||
Assert.Throws<InvalidOperationException>(() => ServerOptions.Load(Env(invalid)), invalid.Item1 + "=" + invalid.Item2);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void HelpListsEveryVariable()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user