Skip to content

Commit 503c70a

Browse files
committed
Added params and value tests to CI
1 parent 402711a commit 503c70a

File tree

5 files changed

+28
-36
lines changed

5 files changed

+28
-36
lines changed

cmake/testing.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ function(add_ydb_test)
130130
WORKING_DIRECTORY
131131
${YDB_TEST_WORKING_DIRECTORY}
132132
)
133+
target_link_libraries(${YDB_TEST_NAME} PRIVATE
134+
GTest::gtest_main
135+
)
133136
else()
134137
add_yunittest(
135138
NAME
@@ -146,6 +149,9 @@ function(add_ydb_test)
146149
WORKING_DIRECTORY
147150
${YDB_TEST_WORKING_DIRECTORY}
148151
)
152+
target_link_libraries(${YDB_TEST_NAME} PRIVATE
153+
cpp-testing-unittest_main
154+
)
149155
endif()
150156

151157
set_yunittest_property(

tests/integration/basic_example/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
add_ydb_test(NAME basic-example
1+
add_ydb_test(NAME basic-example GTEST
22
SOURCES
33
main.cpp
44
basic_example_data.cpp
@@ -9,7 +9,6 @@ add_ydb_test(NAME basic-example
99
YDB-CPP-SDK::Driver
1010
YDB-CPP-SDK::Proto
1111
YDB-CPP-SDK::Table
12-
GTest::gtest_main
1312
LABELS
1413
integration
1514
)
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
add_ydb_test(NAME bulk_upsert
1+
add_ydb_test(NAME bulk_upsert GTEST
22
SOURCES
33
main.cpp
44
bulk_upsert.cpp
55
bulk_upsert.h
66
LINK_LIBRARIES
77
yutil
88
YDB-CPP-SDK::Table
9-
GTest::gtest_main
109
LABELS
1110
integration
1211
)
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
add_ydb_test(NAME server_restart
1+
add_ydb_test(NAME server_restart GTEST
22
SOURCES
33
main.cpp
44
LINK_LIBRARIES
55
yutil
66
api-grpc
77
YDB-CPP-SDK::Query
88
gRPC::grpc++
9-
GTest::gtest_main
109
LABELS
1110
integration
1211
)

tests/unit/client/CMakeLists.txt

Lines changed: 19 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ add_ydb_test(NAME client-ydb_coordination_ut
33
coordination/coordination_ut.cpp
44
LINK_LIBRARIES
55
yutil
6-
cpp-testing-unittest_main
76
YDB-CPP-SDK::Coordination
87
api-grpc
98
LABELS
@@ -15,7 +14,6 @@ add_ydb_test(NAME client-extensions-discovery_mutator_ut
1514
discovery_mutator/discovery_mutator_ut.cpp
1615
LINK_LIBRARIES
1716
yutil
18-
cpp-testing-unittest_main
1917
YDB-CPP-SDK::DiscoveryMutator
2018
YDB-CPP-SDK::Table
2119
LABELS
@@ -27,7 +25,6 @@ add_ydb_test(NAME client-ydb_driver_ut
2725
driver/driver_ut.cpp
2826
LINK_LIBRARIES
2927
yutil
30-
cpp-testing-unittest_main
3128
YDB-CPP-SDK::Driver
3229
YDB-CPP-SDK::Table
3330
LABELS
@@ -41,7 +38,6 @@ add_ydb_test(NAME client-impl-ydb_endpoints_ut
4138
endpoints/endpoints_ut.cpp
4239
LINK_LIBRARIES
4340
yutil
44-
cpp-testing-unittest_main
4541
client-impl-ydb_endpoints
4642
LABELS
4743
unit
@@ -53,7 +49,6 @@ add_ydb_test(NAME client-oauth2_ut
5349
oauth2_token_exchange/jwt_token_source_ut.cpp
5450
LINK_LIBRARIES
5551
yutil
56-
cpp-testing-unittest_main
5752
http-server
5853
json
5954
string_utils-base64
@@ -62,40 +57,34 @@ add_ydb_test(NAME client-oauth2_ut
6257
unit
6358
)
6459

65-
# add_ydb_test(NAME client-ydb_params_ut
66-
# SOURCES
67-
# params/params_ut.cpp
68-
# LINK_LIBRARIES
69-
# yutil
70-
# cpp-testing-unittest_main
71-
# YDB-CPP-SDK::Params
72-
# YDB-CPP-SDK::YsonValue
73-
# LABELS
74-
# unit
75-
# )
60+
add_ydb_test(NAME client-ydb_params_ut GTEST
61+
SOURCES
62+
params/params_ut.cpp
63+
LINK_LIBRARIES
64+
yutil
65+
YDB-CPP-SDK::Params
66+
LABELS
67+
unit
68+
)
7669

7770
add_ydb_test(NAME client-ydb_result_ut
7871
SOURCES
7972
result/result_ut.cpp
8073
LINK_LIBRARIES
8174
yutil
82-
cpp-testing-unittest_main
8375
YDB-CPP-SDK::Result
8476
YDB-CPP-SDK::Params
8577
LABELS
8678
unit
8779
)
8880

89-
# add_ydb_test(NAME client-ydb_value_ut
90-
# SOURCES
91-
# value/value_ut.cpp
92-
# LINK_LIBRARIES
93-
# yutil
94-
# cpp-testing-unittest_main
95-
# YDB-CPP-SDK::Value
96-
# YDB-CPP-SDK::JsonValue
97-
# YDB-CPP-SDK::YsonValue
98-
# YDB-CPP-SDK::Params
99-
# LABELS
100-
# unit
101-
# )
81+
add_ydb_test(NAME client-ydb_value_ut GTEST
82+
SOURCES
83+
value/value_ut.cpp
84+
LINK_LIBRARIES
85+
yutil
86+
YDB-CPP-SDK::Value
87+
YDB-CPP-SDK::Params
88+
LABELS
89+
unit
90+
)

0 commit comments

Comments
 (0)