Fase 10 — Nuova rotta: solo Docker #184
No files matched your search
@@ -86,6 +86,9 @@ internal sealed partial class AnubisHost(
|
||||
/// <summary>Where this server answers from, in plain Italian: the container, the demo or a development run (ADR 0022).</summary>
|
||||
public string Where => options.Where;
|
||||
|
||||
/// <summary>True inside the container; outside it the server runs only for development and tests (ADR 0022).</summary>
|
||||
public bool InContainer => options.InContainer;
|
||||
|
||||
public HostStatus Status => _status;
|
||||
|
||||
public IClock Clock => clock;
|
||||
|
||||
@@ -192,7 +192,7 @@ internal sealed record SystemView(
|
||||
.Select(u => new PlannedJob(JobTime(u.DueUtc, now, zone), u.Description)).ToList();
|
||||
|
||||
var since = host.Status.Since;
|
||||
var platform = host.IsDemo ? "in modalità dimostrativa" : "in Docker";
|
||||
var platform = host.IsDemo ? "in modalità dimostrativa" : host.InContainer ? "in Docker" : "fuori dal container (sviluppo)";
|
||||
var localSince = TimeZoneInfo.ConvertTime(since, zone);
|
||||
var days = (int)Math.Floor((now - since).TotalDays);
|
||||
var running = days >= 1
|
||||
|
||||
@@ -181,7 +181,9 @@ public sealed class DiagnosticsTests
|
||||
Assert.Contains("# Anubis · dati per l'analisi", text);
|
||||
Assert.Contains("- Dove gira: fuori dal container, per sviluppo e prove", text);
|
||||
Assert.Contains("| " + AnubisInfo.Version + " |", text, "The start sample of the running process is in the report.");
|
||||
Assert.Contains("Scarica i dati per l'analisi", await server.TextAsync("/diario"));
|
||||
var diary = await server.TextAsync("/diario");
|
||||
Assert.Contains("Scarica i dati per l'analisi", diary);
|
||||
Assert.Contains(" fuori dal container (sviluppo), acceso ", diary, "The diary says where it runs, as Settings does.");
|
||||
}
|
||||
|
||||
private static ProcessSample Sample(DateTimeOffset at, DateTimeOffset process, double megabytes, int i) => new()
|
||||
|
||||
Reference in new issue
Block a user