Skip to content

Commit 123e228

Browse files
committed
build "almost fixed"
1 parent 23a7fc1 commit 123e228

8 files changed

Lines changed: 20 additions & 13 deletions

File tree

CMakeLists.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ if(USE_CONAN AND CONAN_TOOLCHAIN_FOUND)
132132
)
133133
message(STATUS "Using Conan packages: cpprestsdk::cpprestsdk")
134134
# Add rxcpp if found from Conan
135-
if(TARGET RxCpp::RxCpp)
136-
list(APPEND CONAN_LIBS RxCpp::RxCpp)
135+
if(TARGET rxcpp::rxcpp)
136+
list(APPEND CONAN_LIBS rxcpp::rxcpp)
137137
message(STATUS "Found rxcpp from Conan")
138138
endif()
139139
# Add openssl explicitly to ensure headers are available
@@ -315,6 +315,14 @@ if(BUILD_TESTING)
315315
endif()
316316
endif()
317317

318+
# Enable testing
319+
enable_testing()
320+
321+
# Register tests with CTest
322+
add_test(NAME test-influxdb-cpp-rest COMMAND test-influxdb-cpp-rest)
323+
add_test(NAME test-influx-c-rest COMMAND test-influx-c-rest)
324+
add_test(NAME test-influxdb-cpp-auth COMMAND test-influxdb-cpp-auth)
325+
318326
# Set output directories for executables
319327
set_target_properties(test-influxdb-cpp-rest test-influx-c-rest test-influxdb-cpp-auth
320328
PROPERTIES

src/auth_test/auth_test.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
77
//
88

9-
#define CATCH_CONFIG_RUNNER
10-
#include <catch2/catch.hpp>
9+
#include <catch2/catch_test_macros.hpp>
10+
#include <catch2/catch_session.hpp>
1111

1212
#include <influxdb_line.h>
1313
#include <influxdb_raw_db_utf8.h>
@@ -19,6 +19,7 @@
1919

2020
#include <chrono>
2121
#include <thread>
22+
#include <iostream>
2223

2324
const char* url = "http://localhost:8086";
2425
const char* db_name = "auth_test";
@@ -86,7 +87,7 @@ TEST_CASE_METHOD(authentication_test, "authentication smoke test")
8687
}
8788
}
8889

89-
TEST_CASE_METHOD(authentication_test, "C api authentication smoke test", "[!hide]")
90+
TEST_CASE_METHOD(authentication_test, "C api authentication smoke test DISABLED_until_auth_setup", "[.]")
9091
{
9192
SECTION("query")
9293
{

src/test-shared/async_c_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
77
//
88

9-
#include <catch2/catch.hpp>
9+
#include <catch2/catch_test_macros.hpp>
1010
#include "../influx-c-rest/influx_c_rest_async.h"
1111
#include "../influx-c-rest/influx_c_rest_query.h"
1212

src/test-shared/test_main.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@
66
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
77
//
88

9-
#define CATCH_CONFIG_MAIN
10-
#include <catch2/catch.hpp>
9+
#include <catch2/catch_test_macros.hpp>

src/test/sanitizer_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
77
//
88

9-
#include <catch2/catch.hpp>
9+
#include <catch2/catch_test_macros.hpp>
1010
#include "../influxdb-cpp-rest/input_sanitizer.h"
1111

1212
using namespace influxdb::utility;

src/test/simple_api_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
77
//
88

9-
#include <catch2/catch.hpp>
9+
#include <catch2/catch_test_macros.hpp>
1010

1111
#include "../influxdb-cpp-rest/influxdb_simple_api.h"
1212
#include "../influxdb-cpp-rest/influxdb_simple_async_api.h"

src/test/test_main.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@
66
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
77
//
88

9-
#define CATCH_CONFIG_MAIN
10-
#include <catch2/catch.hpp>
9+
#include <catch2/catch_test_macros.hpp>

src/test/utf8_client_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
77
//
88

9-
#include <catch2/catch.hpp>
9+
#include <catch2/catch_test_macros.hpp>
1010

1111
#include "fixtures.h"
1212

0 commit comments

Comments
 (0)