Remove prototype ignore lists from some tests (#19366)

This commit is contained in:
Leon Friedrich
2023-08-22 16:08:12 +12:00
committed by GitHub
parent 82d39edad8
commit 1ec014cf39
6 changed files with 14 additions and 27 deletions

View File

@@ -63,7 +63,8 @@ public sealed class StealthSystem : SharedStealthSystem
private void OnShutdown(EntityUid uid, StealthComponent component, ComponentShutdown args) private void OnShutdown(EntityUid uid, StealthComponent component, ComponentShutdown args)
{ {
SetShader(uid, false, component); if (!Terminating(uid))
SetShader(uid, false, component);
} }
private void OnShaderRender(EntityUid uid, StealthComponent component, BeforePostShaderRenderEvent args) private void OnShaderRender(EntityUid uid, StealthComponent component, BeforePostShaderRenderEvent args)

View File

@@ -153,17 +153,10 @@ namespace Content.IntegrationTests.Tests
.Select(p => p.ID) .Select(p => p.ID)
.ToList(); .ToList();
// for whatever reason, stealth boxes are breaking this test. Surplus crates have a chance of spawning them.
// TODO fix whatever is going wrong here.
HashSet<string> ignored = new() { "GhostBox", "StealthBox", "CrateSyndicateSurplusBundle", "CrateSyndicateSuperSurplusBundle" };
await server.WaitPost(() => await server.WaitPost(() =>
{ {
foreach (var protoId in protoIds) foreach (var protoId in protoIds)
{ {
if (ignored.Contains(protoId))
continue;
var mapId = mapManager.CreateMap(); var mapId = mapManager.CreateMap();
var grid = mapManager.CreateGrid(mapId); var grid = mapManager.CreateGrid(mapId);
var ent = sEntMan.SpawnEntity(protoId, new EntityCoordinates(grid.Owner, 0.5f, 0.5f)); var ent = sEntMan.SpawnEntity(protoId, new EntityCoordinates(grid.Owner, 0.5f, 0.5f));

View File

@@ -71,7 +71,7 @@ public sealed partial class MindTests
[Test] [Test]
public async Task TestGhostOnDeleteMap() public async Task TestGhostOnDeleteMap()
{ {
await using var pairTracker = await SetupPair(); await using var pairTracker = await SetupPair(dirty: true);
var server = pairTracker.Pair.Server; var server = pairTracker.Pair.Server;
var testMap = await PoolManager.CreateTestMap(pairTracker); var testMap = await PoolManager.CreateTestMap(pairTracker);
var coordinates = testMap.GridCoords; var coordinates = testMap.GridCoords;

View File

@@ -29,18 +29,9 @@ namespace Content.IntegrationTests.Tests;
[TestFixture] [TestFixture]
public sealed class PrototypeSaveTest public sealed class PrototypeSaveTest
{ {
private readonly HashSet<string> _ignoredPrototypes = new()
{
"Singularity", // physics collision uses "AllMask" (-1). The flag serializer currently fails to save this because this features un-named bits.
"constructionghost",
// Don't add to this list unless you have a good reason
// Or it is just temporary because tests stopped working and now master has too many broken entities.
};
[Test] [Test]
public async Task UninitializedSaveTest() public async Task UninitializedSaveTest()
{ {
// Apparently SpawnTest fails to clean up properly. Due to the similarities, I'll assume this also fails.
await using var pairTracker = await PoolManager.GetServerClient(); await using var pairTracker = await PoolManager.GetServerClient();
var server = pairTracker.Pair.Server; var server = pairTracker.Pair.Server;
@@ -92,9 +83,6 @@ public sealed class PrototypeSaveTest
if (!prototype.MapSavable) if (!prototype.MapSavable)
continue; continue;
if (_ignoredPrototypes.Contains(prototype.ID))
continue;
if (prototype.SetSuffix == "DEBUG") if (prototype.SetSuffix == "DEBUG")
continue; continue;
@@ -165,10 +153,7 @@ public sealed class PrototypeSaveTest
var diff = compMapping.Except(protoMapping); var diff = compMapping.Except(protoMapping);
if (diff != null && diff.Children.Count != 0) if (diff != null && diff.Children.Count != 0)
{ Assert.Fail($"Prototype {prototype.ID} modifies component on spawn: {compName}. Modified yaml:\n{diff}");
var modComps = string.Join(",", diff.Keys.Select(x => x.ToString()));
Assert.Fail($"Prototype {prototype.ID} modifies component on spawn: {compName}. Modified fields: {modComps}");
}
} }
else else
{ {

View File

@@ -17,6 +17,8 @@
colliderFixtureId: EventHorizonCollider colliderFixtureId: EventHorizonCollider
consumerFixtureId: EventHorizonConsumer consumerFixtureId: EventHorizonConsumer
- type: GravityWell # To make the singularity attract things. - type: GravityWell # To make the singularity attract things.
baseRadialAcceleration: 10
maxRange: 4
- type: Fixtures - type: Fixtures
fixtures: fixtures:
EventHorizonCollider: EventHorizonCollider:
@@ -43,11 +45,16 @@
energy: 180 energy: 180
level: 1 level: 1
radsPerLevel: 2 radsPerLevel: 2
energyLoss: 1
- type: RandomWalk # To make the singularity move around. - type: RandomWalk # To make the singularity move around.
maxSpeed: 2.5
minSpeed: 1.875
- type: SingularityDistortion - type: SingularityDistortion
intensity: 20 falloffPower: 2.529822
intensity: 3645
- type: RadiationSource - type: RadiationSource
slope: 0.2 # its emit really far away slope: 0.2 # its emit really far away
intensity: 2
- type: PointLight - type: PointLight
enabled: true enabled: true
radius: 10 radius: 10

View File

@@ -50,7 +50,6 @@
- type: Tag - type: Tag
tags: tags:
- DoorBumpOpener - DoorBumpOpener
- type: InteractionOutline
- type: Construction - type: Construction
graph: BaseBigBox graph: BaseBigBox
node: basebigbox node: basebigbox
@@ -66,6 +65,7 @@
- type: Damageable - type: Damageable
damageModifierSet: FlimsyMetallic #Syndicate boxes should have a bit of protection damageModifierSet: FlimsyMetallic #Syndicate boxes should have a bit of protection
- type: Stealth - type: Stealth
hadOutline: true
- type: StealthOnMove - type: StealthOnMove
passiveVisibilityRate: -0.37 passiveVisibilityRate: -0.37
movementVisibilityRate: 0.20 movementVisibilityRate: 0.20
@@ -74,6 +74,7 @@
id: BigBox id: BigBox
parent: BaseBigBox parent: BaseBigBox
components: components:
- type: InteractionOutline
- type: Destructible - type: Destructible
thresholds: thresholds:
- trigger: - trigger: