refactor: Refactor main (#1555)

For #442.
This commit is contained in:
Sergey Kuznetsov
2024-08-01 10:53:17 +01:00
committed by GitHub
parent fb90fb27ae
commit 2fef03d766
36 changed files with 920 additions and 376 deletions

View File

@@ -4,6 +4,7 @@ target_sources(
clio_tests
PRIVATE # Common
ConfigTests.cpp
app/CliArgsTests.cpp
data/AmendmentCenterTests.cpp
data/BackendCountersTests.cpp
data/BackendInterfaceTests.cpp
@@ -125,12 +126,19 @@ target_sources(
util/TxUtilTests.cpp
# Webserver
web/AdminVerificationTests.cpp
web/impl/ServerSslContextTests.cpp
web/RPCServerHandlerTests.cpp
web/ServerTests.cpp
web/SweepHandlerTests.cpp
web/WhitelistHandlerTests.cpp
)
configure_file(test_data/cert.pem ${CMAKE_BINARY_DIR}/tests/unit/test_data/cert.pem COPYONLY)
target_compile_definitions(clio_tests PRIVATE TEST_DATA_SSL_CERT_PATH="tests/unit/test_data/cert.pem")
configure_file(test_data/key.pem ${CMAKE_BINARY_DIR}/tests/unit/test_data/key.pem COPYONLY)
target_compile_definitions(clio_tests PRIVATE TEST_DATA_SSL_KEY_PATH="tests/unit/test_data/key.pem")
# See https://github.com/google/googletest/issues/3475
gtest_discover_tests(clio_tests DISCOVERY_TIMEOUT 90)