mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-11 04:23:29 -08:00
[Server] Add per-run configuration overrides
Add --set key=value to override a section-qualified scalar configuration key for a single run and --print-config to print the effective configuration, with secrets redacted. SettingsCache owns the override map, so reads see the override without rewriting the ini file, and rebuilds the disallowed-name regexps when users/disallowedregexp is overridden. Bare keys and array-scoped keys are rejected because array loops read them relative to the active group, where a full-key override would either be ignored or rewrite every entry. Cover the ini, default, override, override-only-key, regexp-rebuild, secret-redaction, and parse paths with a server-labelled gtest.
This commit is contained in:
parent
3b379618c3
commit
e8fdee6c36
5 changed files with 340 additions and 0 deletions
|
|
@ -14,3 +14,15 @@ cockatrice_add_test(
|
|||
)
|
||||
|
||||
cockatrice_add_test(NAME settings_migration_test SOURCES settings_migration_test.cpp LIBS libcockatrice_settings)
|
||||
|
||||
cockatrice_add_test(
|
||||
NAME
|
||||
servatrice_settings_test
|
||||
SOURCES
|
||||
${CMAKE_SOURCE_DIR}/servatrice/src/settingscache.cpp
|
||||
servatrice_settings_test.cpp
|
||||
INCLUDE_DIRS
|
||||
${CMAKE_SOURCE_DIR}/servatrice/src
|
||||
LABELS
|
||||
server
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue