* Core/Config: Implement config override with env vars
Implement overriding of configuration from the .conf file with environment variables.
Environment variables keys are autogenerated based on the keys defined in .conf file.
Usage example:
$ export TC_DATA_DIR=/usr
$ TC_WORLD_SERVER_PORT=8080 ./worldserver
* Core/Config Fix typo in logs
Co-authored-by: Giacomo Pozzoni <[email protected]>
* Core/Config Fix code style in EnvVarForIniKey
Co-authored-by: Shauren <[email protected]>
* Update tests/common/Config.cpp
* Apply suggestions from code review
Co-authored-by: Peter Keresztes Schmidt <[email protected]>
* Apply suggestions from code review
Co-authored-by: Peter Keresztes Schmidt <[email protected]>
Co-authored-by: Anton Popovichenko <[email protected]>
Co-authored-by: Giacomo Pozzoni <[email protected]>
Co-authored-by: Shauren <[email protected]>
Co-authored-by: Peter Keresztes Schmidt <[email protected]>
(cherry picked from commit 1ddd9dc19cc1df1a1ab8c6123283999f9dea6760)
DelayEvents(Milliseconds delay) had different semantics than
DelayEvents(Milliseconds delay, uint32 group).
The first method delayed the events only in the case the internal timer
already ticked at least for the amount of delay. In contrast the latter method
delayed events regardless of the internal timer value.
Use the latter semantics for DelayEvents(Milliseconds delay) as well which makes
the outcome more predictable. Adapt tests accordingly.
(cherry picked from commit 4470b9122379dc846b322a441951a03913912b71)
With the switch to std::chrono return type of GetTimeUntilEvent
we don't run into an overflow condition which happend with the previous
uint32 return value if the events scheduled execution time is in the past.
Test for this case.
(cherry picked from commit e877f988d1c4e1361612f3d5c4ebe915f746aee5)
To enable the test suite, make sure to configure CMake with -DBUILD_TESTING=1 , since it is disabled by default. The catch2 dependency will be downloaded during configure time.
Also add a new target "tests-common", which includes unit tests for the "common" project. To finally run the tests use the "test" target.
CircleCI: Run unit tests
(cherry picked from commit 6a28ee7b2a4269aa7e43265d1cd0067537e3e883)