mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-12 04:50:01 -08:00
[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.
This commit is contained in:
parent
95b3294c46
commit
16e6e8e3ae
2 changed files with 308 additions and 0 deletions
|
|
@ -394,6 +394,25 @@ cockatrice_add_test(
|
|||
LABELS
|
||||
server
|
||||
)
|
||||
if(WITH_SERVER)
|
||||
# The only test that starts a separately scheduled server process. servatrice-dev is built by the
|
||||
# servatrice subdirectory, which exists only when WITH_SERVER is on; the binary path is baked in
|
||||
# because CTest runs the test from its own working directory.
|
||||
cockatrice_add_test(
|
||||
NAME
|
||||
server_dev_smoke_test
|
||||
SOURCES
|
||||
${VERSION_STRING_CPP}
|
||||
server_dev_smoke_test.cpp
|
||||
LIBS
|
||||
libcockatrice_network_client_remote
|
||||
LABELS
|
||||
server
|
||||
DEFINITIONS
|
||||
"SERVATRICE_DEV_BINARY=\"$<TARGET_FILE:servatrice-dev>\""
|
||||
)
|
||||
add_dependencies(server_dev_smoke_test servatrice-dev)
|
||||
endif()
|
||||
cockatrice_add_test(
|
||||
NAME
|
||||
client_login_status_test
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue