mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 10:53:44 +00:00
chat_log gets guild_id, team_id and filtered (migrations mysql 100, sqlite 83), and the chat log queries take a time range, a guild, a team, a conversation between two characters and paging back by id. Whispers are their own visibility switch (includeWhispers), apart from team and guild chat (includePrivate). Whisper partners and teams that talked are listed with counts. chat_flags, chat_flag_messages and chat_flag_events (mysql 101, sqlite 84) hold flagged chat with a copy of the messages around it, its status, note, linked player report and history. Open flags are in the dashboard snapshot. Tests on SQLite alone (dDatabaseSqliteTests) and in the MySQL parity tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
33 lines
1.6 KiB
CMake
33 lines
1.6 KiB
CMake
# Runs the MySQL and SQLite GameDatabase implementations side by side on fresh databases (all migrations run the way the
|
|
# servers run them) and compares what every method returns. Needs a MariaDB/MySQL server; skipped when
|
|
# DLU_TEST_MYSQL_HOST is not set. See DatabaseParityTests.cpp for the variables.
|
|
add_executable(dDatabaseTests "DatabaseParityTests.cpp")
|
|
|
|
target_include_directories(dDatabaseTests PRIVATE
|
|
"${PROJECT_SOURCE_DIR}/dDatabase/GameDatabase/MySQL"
|
|
"${PROJECT_SOURCE_DIR}/dDatabase/GameDatabase/SQLite"
|
|
"${PROJECT_SOURCE_DIR}/dNet"
|
|
"${PROJECT_SOURCE_DIR}/thirdparty/nlohmann"
|
|
"${PROJECT_SOURCE_DIR}/thirdparty/SQLite"
|
|
)
|
|
|
|
target_link_libraries(dDatabaseTests ${COMMON_LIBRARIES} MariaDB::ConnCpp sqlite3 GTest::gtest_main)
|
|
|
|
gtest_discover_tests(dDatabaseTests)
|
|
|
|
# The chat history and chat flag tables on SQLite alone (no MariaDB/MySQL needed), so they always run.
|
|
add_executable(dDatabaseSqliteTests "ChatHistorySqliteTests.cpp")
|
|
|
|
target_include_directories(dDatabaseSqliteTests PRIVATE
|
|
"${PROJECT_SOURCE_DIR}/dDatabase/GameDatabase/MySQL"
|
|
"${PROJECT_SOURCE_DIR}/dDatabase/GameDatabase/SQLite"
|
|
"${PROJECT_SOURCE_DIR}/dNet"
|
|
"${PROJECT_SOURCE_DIR}/thirdparty/nlohmann"
|
|
"${PROJECT_SOURCE_DIR}/thirdparty/SQLite"
|
|
)
|
|
|
|
# dCommon uses raknet without linking it: link them as a group so the order of the static libraries does not matter
|
|
target_link_libraries(dDatabaseSqliteTests glm::glm "dNet" "magic_enum" "$<LINK_GROUP:RESCAN,dDatabase,dDatabaseGame,dCommon,raknet>" MariaDB::ConnCpp sqlite3 GTest::gtest_main ${CMAKE_DL_LIBS})
|
|
|
|
gtest_discover_tests(dDatabaseSqliteTests)
|