Commit Graph

42 Commits

Author SHA1 Message Date
DrSmugleaf
078f3a7738 Fix ContentIntegrationTest.WaitUntil with a func not passing tickStep 2021-11-24 23:01:35 +01:00
DrSmugleaf
c3fe5909ad THE RETURN OF THE KING
This reverts commit c18d07538a.
2021-11-22 19:08:27 +01:00
DrSmugleaf
c18d07538a Revert "Admin logs (#5419)"
This reverts commit 319aec109d.
2021-11-22 18:55:17 +01:00
Javier Guardia Fernández
319aec109d Admin logs (#5419)
* Add admin logging, models, migrations

* Add logging damage changes

* Add Log admin flag, LogFilter, Logs admin menu tab, message
Refactor admin logging API

* Change admin log get method names

* Fix the name again

* Minute amount of reorganization

* Reset Postgres db snapshot

* Reset Sqlite db snapshot

* Make AdminLog have a composite primary key of round, id

* Minute cleanup

* Change admin system to do a type check instead of index check

* Make admin logs use C# 10 interpolated string handlers

* Implement UI on its own window
Custom controls
Searching
Add admin log converters

* Implement limits into the query

* Change logs to be put into an OutputPanel instead for text wrapping

* Add log <-> player m2m relationship back

* UI improvements, make text wrap, add separators

* Remove entity prefix from damaged log

* Add explicit m2m model, fix any players filter

* Add debug command to test bulk adding logs

* Admin logs now just kinda go

* Add histogram for database update time

* Make admin log system update run every 5 seconds

* Add a cap to the log queue and a metric for how many times it has been reached

* Add metric for logs sent in a round

* Make cvars out of admin logs queue send delay and cap

* Merge fixes

* Reset some changes

* Add test for adding and getting a single log

* Add tests for bulk adding logs

* Add test for querying logs

* Add CallerArgumentExpression to LogStringHandler methods and test

* Improve UI, fix SQLite, add searching by round

* Add entities to admin logs

* Move distinct after orderby

* Add migrations

* ef core eat my ass

* Add cvar for client logs batch size

* Sort logs from newest to oldest by default

* Merge fixes

* Reorganize tests and add one for date ordering

* Add note to log types to not change their numeric values

* Add impacts to logs, better UI filtering

* Make log add callable from shared for convenience

* Get current round id directly from game ticker

* Revert namespace change for DamageableSystem
2021-11-22 18:49:26 +01:00
DrSmugleaf
af6e09c5bd Add being able to force a test to pool 2021-11-21 12:13:26 +01:00
Moony
eb6d24abd0 Makes map vote and roundstart smart about player count. (#5418)
* Makes map vote and roundstart smart about player count.
No more Saltern with 30 players, or Knight Ship with 50.

* a typo

* Address reviews.

* Localized.
2021-11-20 11:32:07 -07:00
Javier Guardia Fernández
c782935d46 Disable client test instance pooling (#5216)
The technology just isn't there yet
2021-11-08 12:52:48 +01:00
Javier Guardia Fernández
1508efff54 Add test pooling (#4961)
* Add test pooling

* WIP test pooling changes

* Fix Destructible tests

* Don't pool unpooled or dummy ticker instances

* Change ServerPathfindingDebugSystem to replace existing entries

* Fix SaveLoadSaveTest comment

* Don't pool StartTest

* Comment out global setup

* Fix puddle tests

* Move SolarPanelComponent initialize to PowerSolarSystem OnMapInit

* Update RobustToolbox

* Finish fixing tests, make test threads background threads

* Bring back pooling

* Fix nullable

* Update RobustToolbox

* Set cvars on server return

* Un-pool tests with custom cvars

* Update RobustToolbox

* Update RobustToolbox

* Change where the main tile coordinates are

* Remove DisposalUnitTest grid check

* Fix test pooling being a fickle bitch

* Fix EntitySystemExtensionsTest

* Update RobustToolbox

* Update RobustToolbox

* Make nullable pool settings true

* Update RobustToolbox

* Wait other way around

* We are unitystation now

* Update RobustToolbox

* Create global setup

* Pool some more tests

* Fix not properly disconnecting clients before restarting the round

* Give more info on ran tests

* Standardize default test cvars

* Update RobustToolbox

* Update RobustToolbox

* Pool clients

* Fix test order issue

* Fix cvars in character creation test not being set properly

* Update RobustToolbox

* Update RobustToolbox

* Rider shut

* Update RobustToolbox

* Format tests ran better

* Update RobustToolbox

* Reset RobustToolbox

* Reset RobustToolbox harder

* Fix one instance of test order causing destructible tests to fail
2021-11-06 11:49:59 +01:00
Vera Aguilera Puerto
d5e34c6ad4 Changes content integration tests to load content resources. (#4248)
* Changes content integration tests to load content resources.

* Content Integration tests override the GameControllerOptions and ServerOptions.
Only engine integration tests can change these!

* don't do component auto-registration by default in content integration tests

* Only use empty map in integration tests if CVar not overriden already.

* don't use nullable annotations in content integration tests...

* Fix integration tests

* Fix spawn test

* Move cvar overrides out of content

* Update submodule.
2021-07-03 15:23:01 +02:00
Vera Aguilera Puerto
d3a611164b Turns GameTicker into an EntitySystem. (#4197)
* GameTicker turned into an EntitySystem

* Turns ClientGameTicker into an EntitySystem, turn NetMessages into events

* Change event names to be more consistent with the rest.

* YAML linter uses the dummy gameticker CVar override.

* Fix game ticker initialization order

* Dummy ticker won't spawn players.

* Fix character creation test
2021-06-20 10:09:24 +02:00
DrSmugleaf
f878f353e4 Move some files out of Content.Shared root because I forgot (#4182) 2021-06-13 22:52:40 +10:00
DrSmugleaf
ff1a2d97ea Re-organize all projects (#4166) 2021-06-09 22:19:39 +02:00
Vera Aguilera Puerto
45263ce739 Content integration tests set ContentStart to true. (#3874) 2021-04-23 14:17:01 +02:00
DrSmugleaf
3e48f185e6 Make warnings the default log failure level in content (#3799)
* Make warnings the default log failure level in content

* Move the default to the constructor

* Remove old changes
2021-04-04 13:00:58 +02:00
DrSmugleaf
8b225ec68f Disable texture preloading in integration tests (#3625)
* Disable texture preloading in tests

* Robusti updati

* Revert "Robusti updati"

This reverts commit 486fb63783477e66de595febc620cef2f1a672bd.
2021-03-13 13:29:32 +11:00
Paul Ritter
5c50b1f6ed Serialization v3 content PR (#3491)
* serv3 in shared pt 1

* beginning of deepclone api

* progress in implementing ideepclone & serv3 in content

* adds target

* its cant hurt you it cant hurt you

* more changes to content.server

* adds dataclasses

* almost there

* renamed & edited entry

* finishes refactoring content to use serv3

* gasmixture runtimes, next: reagentunit

* fucin hell that was an annoying one

* adds flags

* fixes some yaml errors

* removes comment

* fixes generic components for now

* removes todo
actually clones values my god paul
fixes bug involving resolving custom data classes from other proj
renames dataclass
fixes spritecomp
adds WithFormat.Constants support

* adds deepclone to ResistanceSet

* adds a bunch of deepclone implementations
adds a deepclone analyzer (TODO)
adds a deep clone fallback for classes & structs

* fixes a bunch of runtimes

* adds deepclone to entityuid

* adds generator to sln

* gets rid of warnings

* fixes

* argh

* componentdata refactors

* more deepclone impl

* heck me i reworked all of content deepclone

* renames custom dataclasstarget

* misc

* reworks prototypes

* deepclone nuke

* renamed customdataclass attribute

* fixes everything

* misc fixed

* the killcommit

* getting there

* changed yamlfieldattribute namespace

* adds back iselfserialize

* renames everything to data(field/definition)

* ouch

* Fix most errors on content

* Fix more errors in content

* Fix some components

* work on tests

* fixes some customdataclasses

* fuggin shit

* yes

* yeas

* Remove data classes

* Data field naming fixes

* arg

* Git resetti RobustToolbox

* Merge fixes

* General fixes

* Fix startup serialization errors

* Fix DamageContainerPrototype when supported classes or types are null

* Implement construction graph step type serializer

* Fix up construction serialization

* Fix up construction serialization part 2

* Fix null list in technology database component

* Fix body serialization

* Fix entity storage serialization

* Fix actions serialization

* Fix AI serialization

* Fix reaction serialization

* Fix body serialization

* Fix grid atmosphere serialization

* Rename IServ3Manager to ISerializationManager

* Convert every non generic serializer to the new format, general fixes

* Serialization and body system fix

* pushinheritance fix

* Update all prototypes to have a parent and have consistent id/parent properties

* Merge fixes

* smh my head

* cuddling slaps

* Content commit for engine PR

* stuff

* more fixes

* argh

* yes even you are fixed

* changelog fixes

* fixes seeds

* argh

* Test fixes

* Add writing for alert order prototype

* Fix alert order writing

* FIX

* its been alot ok

* Fix the rest of the visualizers

* Fix server alerts component tests

* Fix alert prototype tests not using the read value

* Fix alert prototype tests initializing serialization multiple times

* THIS IS AN AMERICAN CODEBASE GOD BLESS THE USA

* Add ImplicitDataDefinitionForInheritors to IMechanismBehavior
Fixes the behaviors not being found

* Fix NRE in strap component
Good night to the 1 buckle optimization

* Fix clothing component slot flags serialization tag

* Fix body component in all components test

* Merge fixes

* ffs

* Make construction graph prototype use serialization hooks

* human yaml linted

* a

* Do the thing for construction

* stuff

* a

* monke see yaml linter

* LINT HARDER

* Remove redundant todo

* yes

* Add skip hook argument to readers and copiers

* we gamin

* test/datafield fixes

* adds more verbose validation

* moves linter to action

* Improve construction graph step type serializer error message

* Fix ammo box component NRE

* gamin

* some updates to the linter

* yes

* removes that test

* misc fixes

* array fix
priority fix
misc fixes

* adds proper info the validation

* adds alwaysrelevant usa

* Make yaml linter take half as long to run (~50% less)

* Make yaml linter 5 times faster (~80% less execution time)

* based vera being based

* fixes mapsaving

* warning cleanup & moves surpressor

* removes old msbuild targets

* Revert "Make yaml linter 5 times faster (~80% less execution time)"

This reverts commit 3e6091359a26252c3e98828199553de668031c63.

* Add -nowarn to yaml linter run configuration

* Improve yaml linter message feedback

* Make dependencies an argument instead of a property on the serialization manager

* yamllinting slaps

* Clean up type serializers

* Move yaml linter code to its own method

* Fix yaml errors

* Change yaml linter action name and remove -nowarn

* yaml linter please shut

* Git resetti robust toolbox

Co-authored-by: Paul <ritter.paul1+git@googlemail.com>
Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
2021-03-05 01:08:38 +01:00
DrSmugleaf
e963c401e5 Disable Loc warnings for integration tests 2021-02-23 13:10:12 +01:00
Acruid
d1b5a31397 PauseManager moved to Shared (#3288)
* Namespace changes for moving IPauseManager to shared.

* Namespace changes for moving ITimerManager from Timers to Timing.

* Rebase Fixes.

* Update engine submodule to v0.3.8
2021-02-18 20:45:45 -08:00
Vera Aguilera Puerto
9ee0ec4106 Holiday System (#3122) 2021-02-12 10:45:22 +01:00
Acruid
ca4fd649fe Massive Namespace Cleanup (#3120)
* Engine namespace changes.

* Automated remove redundant using statements.

* Simplified Graphics namespace.

* Apparently the container system stores full type names in the map file.😞 This updates those names.

* API Changes to LocalizationManager.LoadCulture.

* Update submodule to v0.3.2
2021-02-11 01:13:03 -08:00
DrSmugleaf
4272716289 Make integration tests use an empty map instead of saltern by default (#3094) 2021-02-07 00:32:48 +11:00
Pieter-Jan Briers
6a74deab37 Disable discord connections in integration tests again.
???
2021-01-15 10:58:09 +01:00
Pieter-Jan Briers
de2bdf4630 Fix integration tests race condition. 2020-12-30 01:18:39 +01:00
Pieter-Jan Briers
af9e0a35ef Update content unit tests for engine modloader changes. 2020-11-25 16:23:51 +01:00
Pieter-Jan Briers
14b793b3b5 Fix tests. 2020-11-24 02:40:42 +01:00
Pieter-Jan Briers
287c23dee3 Merge branch 'multiple-callbacks' into 20-11-13-merges 2020-11-13 01:30:07 +01:00
Pieter-Jan Briers
711166f43a Merge remote-tracking branch 'upstream/master' into 20-10-30-admins 2020-10-30 16:23:21 +01:00
Pieter-Jan Briers
ad58a056d7 ConGroups are gone. Long live admin flags in content. 2020-10-30 16:06:48 +01:00
DrSmugleaf
12d8737e09 Change WaitUntil tickstep default to 1, fix going over the max, better async and fix rejuvenate test not being async (#2439) 2020-10-30 01:08:33 +01:00
DrSmugleaf
0321a74bb6 Allow multiple module testing callbacks 2020-10-29 17:50:25 +01:00
DrSmugleaf
d3d4f7ebe6 Fix ContentIntegrationTest.WaitUntil not checking if the condition is true afterwards (#2192)
* Fix ContentIntegrationTest.WaitUntil not checking if the condition is true afterwards

And remove TryLoadEntities

* Maybe put the assert last
2020-10-11 13:16:15 +02:00
DrSmugleaf
74943a2770 Typo, redundant string interpolation, namespaces and imports cleanup (#2068)
* Readonly, typos and redundant string interpolations

* Namespaces

* Optimize imports

* Address reviews

* but actually

* Localize missing strings

* Remove redundant vars
2020-09-13 14:23:52 +02:00
DrSmugleaf
efbd01d0bf Add test for airlocks opening/closing and blocking entities (#1842)
* Add test for airlocks opening/closing and blocking entities

* Nullable fix classic
2020-08-22 12:30:30 +02:00
Pieter-Jan Briers
75a7223aa1 Integration tests go brrrr 2020-08-20 19:23:16 +02:00
Pieter-Jan Briers
d6b772adcc Integration test to test restartround. 2020-07-17 11:25:11 +02:00
Pieter-Jan Briers
a989fab0b4 More useful integration test features. 2020-06-12 12:45:01 +02:00
Pieter-Jan Briers
eadb661515 Integration tests improvements:
1. Added dummy game ticker for future tests to reduce startup time of test. (no loading a map)
2. Re-organized tests a bit.
2020-01-20 22:14:44 +01:00
ZelteHonor
b2e2aef78d Rider static analysis (#433)
* Non-accessed local variable

* Merge cast and type checks.

* StringComparison.Ordinal added for better culture support

* Supposed code improvement in launcher. Remove unused code.

* Update ExplosionHelper.cs

Unintentional change.

* Optimized Import

* Add Robust.Shared.Utility import where it was deleted

* Other random suggestion

* Improve my comment
2019-11-13 23:37:46 +01:00
Pieter-Jan Briers
44fdf4022e Fix accidental C# 8.0 usage. 2019-08-22 11:06:10 +02:00
Pieter-Jan Briers
09b1066122 Try to fix weird integration tests issues, update submodule. 2019-08-22 10:21:54 +02:00
Pieter-Jan Briers
546770ee70 Don't try to do Discord Rich Presence in integration tests. 2019-07-08 23:17:37 +02:00
Pieter-Jan Briers
f97977323a Improve integration testing 2019-06-29 01:58:16 +02:00