diff --git a/Content.IntegrationTests/ContentIntegrationTest.cs b/Content.IntegrationTests/ContentIntegrationTest.cs index d550bc7cc9..765d3ade75 100644 --- a/Content.IntegrationTests/ContentIntegrationTest.cs +++ b/Content.IntegrationTests/ContentIntegrationTest.cs @@ -7,6 +7,8 @@ using Content.Server.IoC; using Content.Shared.CCVar; using Moq; using NUnit.Framework; +using Robust.Client; +using Robust.Server; using Robust.Server.Maps; using Robust.Shared; using Robust.Shared.ContentPack; @@ -31,6 +33,13 @@ namespace Content.IntegrationTests FailureLogLevel = LogLevel.Warning }; + // Load content resources, but not config and user data. + options.Options = new GameControllerOptions() + { + LoadContentResources = true, + LoadConfigAndUserData = false, + }; + options.ContentStart = true; options.ContentAssemblies = new[] @@ -57,13 +66,6 @@ namespace Content.IntegrationTests }); }; - // Connecting to Discord is a massive waste of time. - // Basically just makes the CI logs a mess. - options.CVarOverrides[CVars.DiscordEnabled.Name] = "false"; - - // Avoid preloading textures in tests. - options.CVarOverrides.TryAdd(CVars.TexturePreloadingEnabled.Name, "false"); - return base.StartClient(options); } @@ -74,6 +76,13 @@ namespace Content.IntegrationTests FailureLogLevel = LogLevel.Warning }; + // Load content resources, but not config and user data. + options.Options = new ServerOptions() + { + LoadConfigAndUserData = false, + LoadContentResources = true, + }; + options.ContentStart = true; options.ContentAssemblies = new[] @@ -105,15 +114,23 @@ namespace Content.IntegrationTests // Disable holidays as some of them might mess with the map at round start. options.CVarOverrides[CCVars.HolidaysEnabled.Name] = "false"; - // Avoid loading a large map by default for integration tests. - options.CVarOverrides[CCVars.GameMap.Name] = "Maps/Test/empty.yml"; + // Avoid loading a large map by default for integration tests if none has been specified. + if(!options.CVarOverrides.ContainsKey(CCVars.GameMap.Name)) + options.CVarOverrides[CCVars.GameMap.Name] = "Maps/Test/empty.yml"; return base.StartServer(options); } protected ServerIntegrationInstance StartServerDummyTicker(ServerIntegrationOptions options = null) { - options ??= new ServerIntegrationOptions(); + options ??= new ServerContentIntegrationOption(); + + // Load content resources, but not config and user data. + options.Options = new ServerOptions() + { + LoadConfigAndUserData = false, + LoadContentResources = true, + }; // Dummy game ticker. options.CVarOverrides[CCVars.GameDummyTicker.Name] = "true"; @@ -229,6 +246,12 @@ namespace Content.IntegrationTests FailureLogLevel = LogLevel.Warning; } + public override GameControllerOptions Options { get; set; } = new() + { + LoadContentResources = true, + LoadConfigAndUserData = false, + }; + public Action ContentBeforeIoC { get; set; } } @@ -239,6 +262,12 @@ namespace Content.IntegrationTests FailureLogLevel = LogLevel.Warning; } + public override ServerOptions Options { get; set; } = new() + { + LoadContentResources = true, + LoadConfigAndUserData = false, + }; + public Action ContentBeforeIoC { get; set; } } } diff --git a/Content.IntegrationTests/Tests/EntityTest.cs b/Content.IntegrationTests/Tests/EntityTest.cs index 63f5f48633..b2812c5478 100644 --- a/Content.IntegrationTests/Tests/EntityTest.cs +++ b/Content.IntegrationTests/Tests/EntityTest.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Threading.Tasks; using Content.Server.Battery.Components; using Content.Server.PowerCell.Components; +using Content.Shared.CCVar; using Content.Shared.Coordinates; using NUnit.Framework; using Robust.Shared.GameObjects; @@ -21,7 +22,12 @@ namespace Content.IntegrationTests.Tests [Test] public async Task SpawnTest() { - var server = StartServerDummyTicker(); + var options = new ServerContentIntegrationOption() + { + CVarOverrides = {{CCVars.AIMaxUpdates.Name, int.MaxValue.ToString()}} + }; + + var server = StartServerDummyTicker(options); await server.WaitIdleAsync(); var mapManager = server.ResolveDependency(); diff --git a/RobustToolbox b/RobustToolbox index abea3024b4..c06707d519 160000 --- a/RobustToolbox +++ b/RobustToolbox @@ -1 +1 @@ -Subproject commit abea3024b4a199d8ac7315c6be0752eeaa884b0a +Subproject commit c06707d51911ebb1ed8005277d0f10e58bf49d6d