Make tests automatically reset modified cvars (#28219)

* Make tests automatically reset modified cvars

* Fix bad return

* A

* Try Fix tests

* clarify comment

* update eng
This commit is contained in:
Leon Friedrich
2024-05-31 14:44:35 +12:00
committed by GitHub
parent 54337911d3
commit 27e63f5919
6 changed files with 91 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ using System.IO;
using System.Linq;
using Content.Server.GameTicking;
using Content.Shared.Players;
using Robust.Shared.Configuration;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Network;
@@ -58,6 +59,9 @@ public sealed partial class TestPair
(Server, ServerLogHandler) = await PoolManager.GenerateServer(settings, testOut);
ActivateContext(testOut);
Client.CfgMan.OnCVarValueChanged += OnClientCvarChanged;
Server.CfgMan.OnCVarValueChanged += OnServerCvarChanged;
if (!settings.NoLoadTestPrototypes)
await LoadPrototypes(testPrototypes!);