chore(host): remove unused Database:MachineDataDb option, validation, config and docs

This commit is contained in:
Joseph Doherty
2026-10-22 06:08:18 -04:00
parent bc1aca0ee6
commit 2da90bf151
20 changed files with 12 additions and 62 deletions
@@ -20,7 +20,6 @@ public class StartupValidatorTests
["ScadaBridge:Node:NodeHostname"] = "central-node1",
["ScadaBridge:Node:RemotingPort"] = "8081",
["ScadaBridge:Database:ConfigurationDb"] = "Server=localhost;Database=Config;",
["ScadaBridge:Database:MachineDataDb"] = "Server=localhost;Database=MachineData;",
["ScadaBridge:Security:Ldap:Server"] = "ldap.example.com",
["ScadaBridge:Security:JwtSigningKey"] = "test-signing-key-at-least-32-chars-long",
["ScadaBridge:Cluster:SeedNodes:0"] = "akka.tcp://scadabridge@central-node1:8081",
@@ -303,24 +302,6 @@ public class StartupValidatorTests
Assert.Contains("ConfigurationDb connection string required for Central", ex.Message);
}
/// <summary>Verifies that a central node missing machine data database fails validation.</summary>
/// <returns>The result.</returns>
[Fact]
public void Central_MissingMachineDataDb_FailsValidation()
{
// The host requirements require MachineDataDb to be
// validated at startup for Central nodes, and the shipped docker appsettings
// (docker/central-node-a/appsettings.Central.json and central-node-b) carry
// the key. The earlier decision (which removed the Require) is reversed
// here: a missing MachineDataDb must fail fast with a clear error.
var values = ValidCentralConfig();
values.Remove("ScadaBridge:Database:MachineDataDb");
var config = BuildConfig(values);
var ex = Assert.Throws<InvalidOperationException>(() => StartupValidator.Validate(config));
Assert.Contains("MachineDataDb connection string required for Central", ex.Message);
}
/// <summary>Verifies that a central node missing LDAP server fails validation.</summary>
/// <returns>The result.</returns>
[Fact]