Cockatrice/tests
BruebachL ccda73fe5c
[Server] Smoke-test the dev server end to end (#7865)
* [Server] Smoke-test the dev server end to end

Spawns servatrice-dev on an ephemeral port and drives a real RemoteClient through login, room list, room join and game creation, asserting each response and the Event_GameJoined payload. The test is WITH_SERVER-gated, links only the client remote library, and keeps the dev server's throwaway settings inside a temporary directory.

* [Server] Publish the dev server's port through a file

The smoke test parsed the listening port out of the dev server's stdout,
but the server announces it from the main thread while the logger thread
writes to the same stream. A log line can land inside the announcement —
Arch CI caught it — leaving the digits on the next line, so the test read
nothing and failed.

Add --port-file, written through QSaveFile once the server listens, and
read the port from there instead of from the log. The file is either
absent or complete, so logging cannot corrupt the handshake.

* [Tests] Tick the event loop while waiting for the port file

The port-file wait loop slept with QThread::msleep and never reached the
event dispatcher. QProcess fills its read buffers and flips its state only
from its socket notifiers, so drainProcessOutput() was a no-op and a child
that died before publishing its port went unnoticed until the full 15 s
startup timeout, with empty stdout and stderr in the failure message.

Pump the event loop instead, as the previous waitForReadyRead loop did.
2026-11-10 12:16:36 +01:00
..
card_zone_algorithms [Refactor] Move game logic into libcockatrice_game (#7437) 2026-10-31 18:44:15 +01:00
carddatabase [Card] Add Scryfall Tagger tag search and filtering (#7337) 2026-11-08 20:57:45 +01:00
deck_list_model Honor finite deck copy limits across printings and deck zones [skip ci] (#7719) 2026-11-09 13:57:39 +01:00
deck_list_zones Fix deck export and mana group ordering (#7729) 2026-11-04 15:43:38 +01:00
game [Client] Preview token edits live and preserve custom drafts (#7737) 2026-11-09 12:59:53 +01:00
icon_assets [Icons] Add an icon asset ratchet test (#7596) 2026-11-04 18:39:42 +01:00
loading_from_clipboard Support tab-separated deck imports (#4222) (#7267) 2026-10-11 21:19:10 +02:00
model_contract [Tests] Use QtTest for model contracts and signal spies (#7630) 2026-11-02 07:27:43 +01:00
movecard_tests [Server] Share one in-memory database interface across the server tests (#7862) 2026-11-10 12:16:35 +01:00
oracle Honor finite deck copy limits across printings and deck zones [skip ci] (#7719) 2026-11-09 13:57:39 +01:00
picture_loader_benchmark [Network] Add a configured QNetworkAccessManager factory (#7628) 2026-10-25 00:33:43 +02:00
settings [Fonts] Retire max font size setting into theme CardText min/max range (#7544) 2026-11-09 14:02:59 +01:00
support [DlgCreateGame] Heap-allocate create game dialog to prevent crash on parent deletion (#7777) 2026-11-05 07:49:20 +01:00
theme_migration [Theme] Pass application palette when generating disabled icon pixmap (#7831) 2026-11-09 21:34:08 +01:00
card_art_crop_test.cpp [Banner] Keep horizontal user banner crops inside the artwork (#7742) 2026-11-04 17:08:54 +01:00
card_update_progress_test.cpp [Client] Improve card database update visibility (#7458) 2026-10-09 11:07:48 +02:00
clamped_arithmetic_test.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
client_login_status_test.cpp [CI] Pin used GH Actions (#7716) 2026-11-08 15:45:54 +01:00
CMakeLists.txt [Server] Smoke-test the dev server end to end (#7865) 2026-11-10 12:16:36 +01:00
crash_reporter_test.cpp [Crash] Add lifecycle breadcrumbs for unattributable native crashes (#7813) 2026-11-08 23:06:21 +01:00
create_game_form_widget_test.cpp [Refactor] Split CreateGameFormWidget out of DlgCreateGame (#7801) 2026-11-08 16:22:31 +01:00
deck_hash_performance_test.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
deck_state_manager_test.cpp [Client] Make DeckStateManager::decrementCard remove tokens from the token zone if the token is not in the given zone (#7588) 2026-11-03 10:37:17 +01:00
expression_test.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
font_config_test.cpp [Fonts] Retire max font size setting into theme CardText min/max range (#7544) 2026-11-09 14:02:59 +01:00
forwarded_address_test.cpp [Server] Parse the rightmost address from forwarded header lists (#7586) 2026-10-18 16:53:55 -04:00
game_creation_options_test.cpp [Lobby] Add instant quick host to the game room (#7802) 2026-11-08 22:12:29 +01:00
holder_line_test.cpp [CrashReporting] Name the files and processes behind a failed installer purge (#7590) 2026-10-24 00:46:54 +02:00
image_redirect_chain_test.cpp [PictureLoader] Improve image negotiation, cache recovery and redirects (#7703) 2026-11-08 19:02:07 +01:00
image_request_queue_test.cpp [PictureLoader] Improve image negotiation, cache recovery and redirects (#7703) 2026-11-08 19:02:07 +01:00
installer_close_server_test.cpp [Installer] Graceful close and a way out of a stuck update (#7687) 2026-10-31 15:32:59 +01:00
lag_monitor_test.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
latency_tracker_test.cpp [CI] Update Linux Dockerfiles (#6894) 2026-11-08 09:01:56 +01:00
loader_local_matching_test.cpp [CI] Update Linux Dockerfiles (#6894) 2026-11-08 09:01:56 +01:00
local_client_lifetime_test.cpp [Client] Fix crash when local game commands are sent after shutdown (#7714) 2026-11-02 13:28:23 +01:00
metrics_registry_test.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
moxfield_signature_spells_test.cpp Import Moxfield signature spells into the deck [skip ci] (#7751) 2026-11-03 10:40:28 +01:00
password_hash_test.cpp [Utility] Budget scrypt's XY array in the derivation memory limit (#7712) 2026-11-02 07:29:15 +01:00
payload_paths_test.cpp [Installer] Name only the payload programs installed in the directory (#7684) 2026-10-30 13:16:50 +01:00
playmat_resolver_test.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
private_chat_paging_test.cpp [Server] Let users fetch their own private chat history (#7506) 2026-11-09 13:21:43 +01:00
random_reveal_test.cpp [Game] Reveal multiple distinct random hand cards to a recipient (#7753) 2026-11-08 16:41:14 +01:00
rate_limiter_test.cpp [Server] Inform client of login/registration rate limit timeout (#7468) 2026-10-16 05:47:43 +02:00
report_categories_test.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
servatrice_in_memory_database_test.cpp [Server] Add a servatrice-dev executable on the in-memory database (#7864) 2026-11-10 12:16:36 +01:00
server_card_counter_test.cpp [Build] Let AUTOMOC process library headers (#7638) 2026-10-31 18:49:05 +01:00
server_counter_test.cpp [CI] Update Linux Dockerfiles (#6894) 2026-11-08 09:01:56 +01:00
server_dev_smoke_test.cpp [Server] Smoke-test the dev server end to end (#7865) 2026-11-10 12:16:36 +01:00
server_developer_role_test.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
server_dump_zone_test.cpp [CI] Pin used GH Actions (#7716) 2026-11-08 15:45:54 +01:00
server_forced_password_change_test.cpp [Server] Share one in-memory database interface across the server tests (#7862) 2026-11-10 12:16:35 +01:00
server_game_join_test.cpp [Server] Share one in-memory database interface across the server tests (#7862) 2026-11-10 12:16:35 +01:00
server_logger_test.cpp [CardDB] Break the CardInfo <-> CardSet cycle on reload (#7645) 2026-10-31 19:37:15 +01:00
server_moderator_role_test.cpp [Report] Add report reopen action for closed reports (#7442) 2026-10-11 15:28:45 +02:00
server_rate_limiter_test.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
server_room_channels_test.cpp [Server] Share one in-memory database interface across the server tests (#7862) 2026-11-10 12:16:35 +01:00
single_instance_manager_test.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
spoiler_file_test.cpp [DlgCreateGame] Heap-allocate create game dialog to prevent crash on parent deletion (#7777) 2026-11-05 07:49:20 +01:00
svg_recolor_test.cpp [Icons] Tint semantic glyphs and add badge and sticker treatments (#7775) 2026-11-08 19:09:01 +01:00
test_age_formatting.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
translation_loader_test.cpp [Translation] Name languages without reading the translation files (#7662) 2026-10-26 02:39:26 +01:00
translation_loader_test.ts [Translations] Load Qt's own translations and build ours with the binary (#7384) 2026-10-03 15:04:30 +02:00
trusted_sources_test.cpp [Servatrice] Match trusted_sources by address, not substring (#7582) 2026-10-18 16:50:04 -04:00
user_data_backup_test.cpp [Installer][Client] Back up user data before old uninstallers can delete it (#7503) 2026-10-16 22:05:42 +02:00
user_games_model_test.cpp Fix user card games for offline users and stale requests (#7738) 2026-11-04 05:29:51 +01:00
warning_categories_test.cpp [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00