Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix more integration tests #2489

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
b680124
Update AutoInternalsTests.cs
dvir001 Nov 30, 2024
396b7bf
Update UiControlTest.cs
dvir001 Nov 30, 2024
3101ea6
Update StorageInteractionTest.cs
dvir001 Dec 1, 2024
7593185
Update EntityTest.cs
dvir001 Dec 1, 2024
d24d53e
Update AutoInternalsTests.cs
dvir001 Dec 1, 2024
70033a6
Update StorageInteractionTest.cs
dvir001 Dec 1, 2024
daa9d34
Update UiControlTest.cs
dvir001 Dec 1, 2024
39a14c2
Merge branch 'master' into 2024-12-01-Tests
dvir001 Dec 1, 2024
8dca3f6
Update AutoInternalsTests.cs
dvir001 Dec 1, 2024
2f43180
Merge branch '2024-12-01-Tests' of https://github.com/dvir001/frontie…
dvir001 Dec 1, 2024
1336d2c
Update AutoInternalsTests.cs
dvir001 Dec 1, 2024
f4969dc
Cleanup
dvir001 Dec 1, 2024
80d4a7c
A mess
dvir001 Dec 1, 2024
55bdb15
Update nfsd.yml
dvir001 Dec 1, 2024
562c18f
Merge branch 'master' into 2024-12-01-Tests
dvir001 Jan 10, 2025
478086f
Merge branch 'master' into 2024-12-01-Tests
Cheackraze Jan 12, 2025
4ab9f1a
Merge branch 'master' into 2024-12-01-Tests
dvir001 Jan 16, 2025
d0b2569
Merge branch 'master' into 2024-12-01-Tests
dvir001 Feb 5, 2025
0ecb7d5
Update darts.yml
dvir001 Feb 5, 2025
9919fb3
Never did this
dvir001 Feb 6, 2025
4e3e996
MobThresholds?
whatston3 Feb 6, 2025
747c63f
MobThresholds: don't log errors in IncapThreshold
whatston3 Feb 6, 2025
f4b0703
base trading crate is abstract
whatston3 Feb 6, 2025
b203207
syndies get one survival box
whatston3 Feb 6, 2025
50044a9
GunSystem: fix degenerate direction
whatston3 Feb 6, 2025
47cf454
just mimic the debug assertion
whatston3 Feb 6, 2025
b22c491
Update UiControlTest.cs
dvir001 Feb 6, 2025
5e7cc27
Update UiControlTest.cs
dvir001 Feb 6, 2025
9bac071
Update EntityTest.cs
dvir001 Feb 6, 2025
5fc3f6f
Update EntityTest.cs
dvir001 Feb 6, 2025
c486a27
Update EntityTest.cs
dvir001 Feb 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions Content.IntegrationTests/Tests/EntityTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ public sealed class EntityTest
private static readonly ProtoId<EntityCategoryPrototype> SpawnerCategory = "Spawner";

[Test]
[Ignore("Preventing CI tests from failing")] // Frontier: FIXME - unsure which entities are currently failing
public async Task SpawnAndDeleteAllEntitiesOnDifferentMaps()
{
// This test dirties the pair as it simply deletes ALL entities when done. Overhead of restarting the round
Expand Down Expand Up @@ -82,7 +81,6 @@ await server.WaitPost(() =>
}

[Test]
[Ignore("Preventing CI tests from failing")] // Frontier: FIXME - unsure which entities are currently failing
public async Task SpawnAndDeleteAllEntitiesInTheSameSpot()
{
// This test dirties the pair as it simply deletes ALL entities when done. Overhead of restarting the round
Expand Down Expand Up @@ -141,7 +139,6 @@ await server.WaitPost(() =>
/// all components on every entity.
/// </summary>
[Test]
[Ignore("Preventing CI tests from failing")] // Frontier: FIXME - unsure which entities are currently failing
public async Task SpawnAndDirtyAllEntities()
{
// This test dirties the pair as it simply deletes ALL entities when done. Overhead of restarting the round
Expand Down Expand Up @@ -227,7 +224,6 @@ await server.WaitPost(() =>
/// crude test to try catch issues like this, and possibly should just be disabled.
/// </remarks>
[Test]
[Ignore("Preventing CI tests from failing")] // Frontier: FIXME - unsure which entities are currently failing
public async Task SpawnAndDeleteEntityCountTest()
{
var settings = new PoolSettings { Connected = true, Dirty = true };
Expand All @@ -241,6 +237,7 @@ public async Task SpawnAndDeleteEntityCountTest()
"MapGrid",
"StationEvent",
"TimedDespawn",
"TransferMindOnDespawnComponent", // Frontier

// makes an announcement on mapInit.
"AnnounceOnSpawn",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ namespace Content.IntegrationTests.Tests.Internals;
[TestOf(typeof(InternalsSystem))]
public sealed class AutoInternalsTests
{
[Ignore("Not relevant for Frontier")] // Frontier
[Test]
[Ignore("Preventing CI tests from failing")] // Frontier: FIXME
public async Task TestInternalsAutoActivateInSpaceForStationSpawn()
{
await using var pair = await PoolManager.GetServerClient();
Expand All @@ -35,7 +36,8 @@ await server.WaitAssertion(() =>
await pair.CleanReturnAsync();
}

[Ignore("Not relevant for Frontier")] // Frontier
[Test]
[Ignore("Preventing CI tests from failing")] // Frontier: FIXME
public async Task TestInternalsAutoActivateInSpaceForEntitySpawn()
{
await using var pair = await PoolManager.GetServerClient();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public sealed class StorageInteractionTest : InteractionTest
/// Check that players can interact with items in storage if the storage UI is open
/// </summary>
[Test]
[Ignore("Preventing CI tests from failing")] // Frontier: FIXME - no idea what's actually causing a failure here.
[Ignore("Preventing CI tests from failing")] // Frontier: FIXME - no idea what's actually causing a failure here..
public async Task UiInteractTest()
{
var sys = Server.System<SharedContainerSystem>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ public sealed class UiControlTest
/// Tests that all windows can be instantiated successfully.
/// </summary>
[Test]
[Ignore("Preventing CI tests from failing")] // Frontier: FIXME - bad Cryosleep UI registration
public async Task TestWindows()
{
var pair = await PoolManager.GetServerClient(new PoolSettings()
Expand Down
5 changes: 5 additions & 0 deletions Content.Server/Weapons/Ranged/Systems/GunSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@ public override void Shoot(EntityUid gunUid, GunComponent gun, List<(EntityUid?
var fromEffect = fromCoordinates;
var dir = mapDirection.Normalized();

// Frontier: if direction isn't near one (standing on top of target), default to a given direction
if (!MathHelper.CloseToPercent(dir.LengthSquared(), 1))
dir = new Vector2(1, 0);
// End Frontier

//in the situation when user == null, means that the cannon fires on its own (via signals). And we need the gun to not fire by itself in this case
var lastUser = user ?? gunUid;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ namespace Content.Server.Explosion.Components;
/// Frontier: Triggers on the entity hitting something else as a projectile.
/// </summary>
[RegisterComponent]
public sealed partial class TriggerOnProjectileHitComponent : Component;
public sealed partial class TriggerOnProjectileHitComponent : Component
{
}
2 changes: 1 addition & 1 deletion Content.Shared/Mobs/Systems/MobThresholdSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public bool TryGetIncapThreshold(EntityUid target, [NotNullWhen(true)] out Fixed
MobThresholdsComponent? thresholdComponent = null)
{
threshold = null;
if (!Resolve(target, ref thresholdComponent))
if (!Resolve(target, ref thresholdComponent, logMissing: false)) // Frontier: set logMissing to false
return false;

return TryGetThresholdForState(target, MobState.Critical, out threshold, thresholdComponent)
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Loadouts/loadout_groups.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1318,7 +1318,7 @@
- type: loadoutGroup
id: SurvivalSyndicate
name: loadout-group-survival-syndicate
minLimit: 2
minLimit: 1 # Frontier: 2<1 - test failures, getting two boxes
hidden: true
loadouts:
- EmergencyNitrogenSyndicate
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
- type: entity
parent: [BaseStructureLockImmuneToEmag, BaseStructureAccessReaderImmuneToEmag, CrateBaseWeldable]
id: CrateTradeBaseSecure
abstract: true
categories: [ HideSpawnMenu ]
components:
- type: TradeCrate
Expand Down
Loading