Skip to content

Commit 335b912

Browse files
committed
tests: out_pgsql: Add internal unit tests for the refactored plugin
Signed-off-by: Jonathan Gonzalez V. <jonathan.abdiel@gmail.com>
1 parent c683762 commit 335b912

2 files changed

Lines changed: 938 additions & 0 deletions

File tree

tests/internal/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,13 @@ if(FLB_OUT_AZURE_BLOB)
6666
)
6767
endif()
6868

69+
if(FLB_OUT_PGSQL)
70+
set(UNIT_TESTS_FILES
71+
${UNIT_TESTS_FILES}
72+
pgsql.c
73+
)
74+
endif()
75+
6976
# TLS helpers
7077
if(FLB_TLS)
7178
set(UNIT_TESTS_FILES
@@ -247,6 +254,11 @@ function(prepare_unit_tests TEST_PREFIX SOURCEFILES)
247254
target_link_libraries(${source_file_we} flb-plugin-out_azure_blob)
248255
endif()
249256

257+
if(FLB_OUT_PGSQL AND "${source_file_we}" STREQUAL "flb-it-pgsql")
258+
target_link_libraries(${source_file_we} flb-plugin-out_pgsql)
259+
target_include_directories(${source_file_we} PRIVATE ${PostgreSQL_INCLUDE_DIRS})
260+
endif()
261+
250262
if(FLB_STREAM_PROCESSOR)
251263
target_link_libraries(${source_file_we} flb-sp)
252264
endif()

0 commit comments

Comments
 (0)