Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move remaining tests and build/run all legacy tests using CMake #26

Merged
merged 5 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

- name: Build using cmake
env:
EXTRA_CMAKE_OPTS: -DENABLE_EXAMPLES:BOOL=ON -DENABLE_SSL:BOOL=ON -DENABLE_SSL_TESTS:BOOL=ON -DENABLE_ASYNC_TESTS:BOOL=ON
EXTRA_CMAKE_OPTS: -DENABLE_EXAMPLES:BOOL=ON -DENABLE_SSL:BOOL=ON
CFLAGS: -Werror
CXXFLAGS: -Werror
run: mkdir build && cd build && cmake .. && make
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:

- name: Build using cmake
env:
EXTRA_CMAKE_OPTS: -DENABLE_EXAMPLES:BOOL=ON -DENABLE_SSL:BOOL=ON -DENABLE_SSL_TESTS:BOOL=ON -DENABLE_ASYNC_TESTS:BOOL=ON
EXTRA_CMAKE_OPTS: -DENABLE_EXAMPLES:BOOL=ON -DENABLE_SSL:BOOL=ON
CFLAGS: -Werror
CXXFLAGS: -Werror
run: mkdir build && cd build && cmake3 .. && make
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:

- name: Build using cmake
env:
EXTRA_CMAKE_OPTS: -DENABLE_EXAMPLES:BOOL=ON -DENABLE_SSL:BOOL=ON -DENABLE_SSL_TESTS:BOOL=ON -DENABLE_ASYNC_TESTS:BOOL=ON
EXTRA_CMAKE_OPTS: -DENABLE_EXAMPLES:BOOL=ON -DENABLE_SSL:BOOL=ON
CFLAGS: -Werror
CXXFLAGS: -Werror
run: mkdir build && cd build && cmake .. && make
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,10 @@ jobs:
with:
packages: libevent-dev libuv1-dev libev-dev libglib2.0-dev ${{ matrix.compiler }}
version: 1.0
- name: Install hiredis
env:
VERSION: 1.2.0
- name: Install Valkey for non-cluster tests
run: |
curl -L https://github.com/redis/hiredis/archive/v${VERSION}.tar.gz | tar -xz
cmake -S hiredis-${VERSION} -B hiredis-build -DENABLE_SSL=ON
sudo make -C hiredis-build install
git clone --depth 1 --branch 7.2.5 https://github.com/valkey-io/valkey.git
cd valkey && BUILD_TLS=yes make install
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@802fa1a2c4e212495c05bf94dba2704a92a472be # v2.0.2
with:
Expand Down
19 changes: 12 additions & 7 deletions .github/workflows/db-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@ jobs:
fail-fast: false
matrix:
include:
- valkey-version: 7.2.5
- valkey-version: '7.2.5'
steps:
- name: Prepare
uses: awalsh128/cache-apt-pkgs-action@a6c3917cc929dd0345bfb2d3feaf9101823370ad # v1.4.2
with:
packages: libevent-dev
version: 1.0
- name: Install Valkey for non-cluster tests
run: |
git clone --depth 1 --branch ${{ matrix.valkey-version }} https://github.com/valkey-io/valkey.git
cd valkey && BUILD_TLS=yes make install
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Create build folder
run: cmake -E make_directory build
Expand Down Expand Up @@ -55,18 +59,19 @@ jobs:
fail-fast: false
matrix:
include:
- redis-version: 7.2.4
- redis-version: 7.0.15
- redis-version: 6.2.14
- redis-version: 6.0.20
- redis-version: 5.0.14
- redis-version: '7.2.4'
- redis-version: '7.0.15'
- redis-version: '6.2.14'
steps:
- name: Prepare
uses: awalsh128/cache-apt-pkgs-action@a6c3917cc929dd0345bfb2d3feaf9101823370ad # v1.4.2
with:
packages: libevent-dev
version: 1.0

- name: Install Redis for non-cluster tests
run: |
git clone --depth 1 --branch ${{ matrix.redis-version }} https://github.com/redis/redis.git
cd redis && BUILD_TLS=yes make install
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5

- name: Create build folder
Expand Down
26 changes: 9 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ INCLUDE(GNUInstallDirs)
OPTION(BUILD_SHARED_LIBS "Build shared libraries" ON)
OPTION(ENABLE_SSL "Build valkey_ssl for SSL support" OFF)
OPTION(DISABLE_TESTS "If tests should be compiled or not" OFF)
OPTION(ENABLE_SSL_TESTS "Should we test SSL connections" OFF)
OPTION(ENABLE_EXAMPLES "Enable building valkey examples" OFF)
OPTION(ENABLE_ASYNC_TESTS "Should we run all asynchronous API tests" OFF)
option(ENABLE_IPV6_TESTS "Enable IPv6 tests requiring special prerequisites" OFF)
# Historically, the NuGet file was always install; default
# to ON for those who rely on that historical behaviour.
OPTION(ENABLE_NUGET "Install NuGET packaging details" ON)
Expand Down Expand Up @@ -237,21 +236,14 @@ IF(ENABLE_SSL)
DESTINATION ${CMAKE_CONF_INSTALL_DIR})
ENDIF()

#IF(NOT DISABLE_TESTS)
# ENABLE_TESTING()
# ADD_EXECUTABLE(libvalkey-test test.c)
# TARGET_LINK_LIBRARIES(libvalkey-test valkey)
# IF(ENABLE_SSL_TESTS)
# ADD_DEFINITIONS(-DVALKEY_TEST_SSL=1)
# TARGET_LINK_LIBRARIES(libvalkey-test valkey_ssl)
# ENDIF()
# IF(ENABLE_ASYNC_TESTS)
# ADD_DEFINITIONS(-DVALKEY_TEST_ASYNC=1)
# TARGET_LINK_LIBRARIES(libvalkey-test event)
# ENDIF()
# ADD_TEST(NAME libvalkey-test
# COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/test.sh)
#ENDIF()
# Add tests
if(NOT DISABLE_TESTS)
# Make sure ctest prints the output when a test fails.
# Must be set before including CTest.
set(CMAKE_CTEST_ARGUMENTS "--output-on-failure")
include(CTest)
add_subdirectory(tests)
endif()

# Add examples
IF(ENABLE_EXAMPLES)
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ TEST_DIR = tests

INCLUDE_DIR = include/valkey

TEST_SRCS = $(wildcard $(TEST_DIR)/*.c)
TEST_SRCS = $(TEST_DIR)/client_test.c
TEST_OBJS = $(patsubst $(TEST_DIR)/%.c,$(OBJ_DIR)/%.o,$(TEST_SRCS))
TEST_BINS = $(patsubst $(TEST_DIR)/%.c,$(TEST_DIR)/%,$(TEST_SRCS))

Expand Down
121 changes: 57 additions & 64 deletions libvalkeycluster/tests/CMakeLists.txt → tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,41 +1,35 @@
SET(TEST_WITH_REDIS_VERSION "6.2.1" CACHE STRING "Redis version used when running tests.")

# Re-enable `-std=gnu99` for tests only, this avoids the need to sprinkle
# `#define _XOPEN_SOURCE 600` in test code for e.g. strdup()
set(CMAKE_C_EXTENSIONS ON)
SET(TEST_WITH_VALKEY_VERSION "7.2.5" CACHE STRING "Valkey version used when running tests.")

if(ENABLE_SSL)
# Generate SSL certs and keys when needed
set(SSL_CONFIGS ca.crt ca.key ca.txt redis.crt redis.key client.crt client.key)
set(SSL_CONFIGS ca.crt ca.key ca.txt valkey.crt valkey.key client.crt client.key)
add_custom_command(
OUTPUT ${SSL_CONFIGS}
COMMAND openssl genrsa -out ca.key 4096
COMMAND openssl req -x509 -new -nodes -sha256 -key ca.key -days 3650 -subj '/CN=Redis Test CA' -out ca.crt
COMMAND openssl genrsa -out redis.key 2048
COMMAND openssl req -new -sha256 -key redis.key -subj '/CN=Redis Server Test Cert' | openssl x509 -req -sha256 -CA ca.crt -CAkey ca.key -CAserial ca.txt -CAcreateserial -days 365 -out redis.crt
COMMAND openssl req -x509 -new -nodes -sha256 -key ca.key -days 3650 -subj '/CN=Valkey Test CA' -out ca.crt
COMMAND openssl genrsa -out valkey.key 2048
COMMAND openssl req -new -sha256 -key valkey.key -subj '/CN=Valkey Server Test Cert' | openssl x509 -req -sha256 -CA ca.crt -CAkey ca.key -CAserial ca.txt -CAcreateserial -days 365 -out valkey.crt
COMMAND openssl genrsa -out client.key 2048
COMMAND openssl req -new -sha256 -key client.key -subj '/CN=Redis Client Test Cert' | openssl x509 -req -sha256 -CA ca.crt -CAkey ca.key -CAserial ca.txt -CAcreateserial -days 365 -out client.crt
COMMAND openssl req -new -sha256 -key client.key -subj '/CN=Valkey Client Test Cert' | openssl x509 -req -sha256 -CA ca.crt -CAkey ca.key -CAserial ca.txt -CAcreateserial -days 365 -out client.crt
)
add_custom_target(generate_tls_configs DEPENDS ${SSL_CONFIGS})

set(SSL_LIBRARY hiredis_cluster_ssl)
set(SSL_LIBRARY valkey_ssl)
endif()

# Targets to setup Redis Clusters for testing
if(ENABLE_IPV6_TESTS)
set(NO_IPV6 "")
else()
set(NO_IPV6 "true") # Ignore command
endif()

if(TEST_WITH_VALKEY_VERSION)
set(CLUSTER_SCRIPT "${CMAKE_SOURCE_DIR}/tests/scripts/valkey-cluster")
set(CLUSTER_VERSION "VALKEY_VERSION=${TEST_WITH_VALKEY_VERSION}")
else()
# Targets to setup clusters for testing
if(TEST_WITH_REDIS_VERSION)
set(CLUSTER_SCRIPT "${CMAKE_SOURCE_DIR}/tests/scripts/redis-cluster")
set(CLUSTER_VERSION "REDIS_VERSION=${TEST_WITH_REDIS_VERSION}")
else()
set(CLUSTER_SCRIPT "${CMAKE_SOURCE_DIR}/tests/scripts/valkey-cluster")
set(CLUSTER_VERSION "VALKEY_VERSION=${TEST_WITH_VALKEY_VERSION}")
endif()

add_custom_target(start
COMMAND PORT=7000 ${CLUSTER_VERSION} ${CLUSTER_SCRIPT} start
COMMAND PORT=7100 ${CLUSTER_VERSION} ADDITIONAL_OPTIONS='--requirepass secretword --masterauth secretword' ADDITIONAL_CLI_OPTIONS='-a secretword' ${CLUSTER_SCRIPT} start
Expand Down Expand Up @@ -64,67 +58,73 @@ else()
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "" FORCE)
endif()

# Make sure ctest gives the output when tests fail
list(APPEND CMAKE_CTEST_ARGUMENTS "--output-on-failure")
# Add non-cluster tests

add_executable(client_test client_test.c)
if(SSL_LIBRARY)
target_compile_definitions(client_test PUBLIC VALKEY_TEST_SSL=1)
endif()
if(LIBEVENT_LIBRARY)
target_compile_definitions(client_test PUBLIC VALKEY_TEST_ASYNC=1)
endif()
target_link_libraries(client_test valkey ${SSL_LIBRARY} ${LIBEVENT_LIBRARY})
add_test(NAME client_test COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/test.sh")
if(TEST_WITH_REDIS_VERSION)
set_property(TEST client_test PROPERTY ENVIRONMENT "VALKEY_SERVER=redis-server")
endif()
if(SSL_LIBRARY)
set_property(TEST client_test PROPERTY ENVIRONMENT "TEST_SSL=1")
endif()

# Add cluster tests

add_executable(ct_async ct_async.c)
target_link_libraries(ct_async hiredis_cluster ${SSL_LIBRARY} ${LIBEVENT_LIBRARY})
target_link_libraries(ct_async valkey ${SSL_LIBRARY} ${LIBEVENT_LIBRARY})
add_test(NAME ct_async COMMAND "$<TARGET_FILE:ct_async>")
set_tests_properties(ct_async PROPERTIES LABELS "CT")

add_executable(ct_commands ct_commands.c test_utils.c)
target_link_libraries(ct_commands hiredis_cluster ${SSL_LIBRARY})
target_link_libraries(ct_commands valkey ${SSL_LIBRARY})
add_test(NAME ct_commands COMMAND "$<TARGET_FILE:ct_commands>")
set_tests_properties(ct_commands PROPERTIES LABELS "CT")

add_executable(ct_connection ct_connection.c test_utils.c)
target_link_libraries(ct_connection hiredis_cluster ${SSL_LIBRARY} ${LIBEVENT_LIBRARY})
target_link_libraries(ct_connection valkey ${SSL_LIBRARY} ${LIBEVENT_LIBRARY})
add_test(NAME ct_connection COMMAND "$<TARGET_FILE:ct_connection>")
set_tests_properties(ct_connection PROPERTIES LABELS "CT")

add_executable(ct_pipeline ct_pipeline.c)
target_link_libraries(ct_pipeline hiredis_cluster ${SSL_LIBRARY} ${LIBEVENT_LIBRARY})
target_link_libraries(ct_pipeline valkey ${SSL_LIBRARY} ${LIBEVENT_LIBRARY})
add_test(NAME ct_pipeline COMMAND "$<TARGET_FILE:ct_pipeline>")
set_tests_properties(ct_pipeline PROPERTIES LABELS "CT")

add_executable(ct_connection_ipv6 ct_connection_ipv6.c)
target_link_libraries(ct_connection_ipv6 hiredis_cluster ${SSL_LIBRARY} ${LIBEVENT_LIBRARY})
target_link_libraries(ct_connection_ipv6 valkey ${SSL_LIBRARY} ${LIBEVENT_LIBRARY})
add_test(NAME ct_connection_ipv6 COMMAND "$<TARGET_FILE:ct_connection_ipv6>")
set_tests_properties(ct_connection_ipv6 PROPERTIES LABELS "CT")
if(NOT ENABLE_IPV6_TESTS)
set_tests_properties(ct_connection_ipv6 PROPERTIES DISABLED True)
endif()

add_executable(ct_out_of_memory_handling ct_out_of_memory_handling.c)
target_link_libraries(ct_out_of_memory_handling hiredis_cluster ${SSL_LIBRARY} ${LIBEVENT_LIBRARY})
target_link_libraries(ct_out_of_memory_handling valkey ${SSL_LIBRARY} ${LIBEVENT_LIBRARY})
add_test(NAME ct_out_of_memory_handling COMMAND "$<TARGET_FILE:ct_out_of_memory_handling>")
set_tests_properties(ct_out_of_memory_handling PROPERTIES LABELS "CT")

add_executable(ct_specific_nodes ct_specific_nodes.c test_utils.c)
target_link_libraries(ct_specific_nodes hiredis_cluster ${SSL_LIBRARY} ${LIBEVENT_LIBRARY})
target_link_libraries(ct_specific_nodes valkey ${SSL_LIBRARY} ${LIBEVENT_LIBRARY})
add_test(NAME ct_specific_nodes COMMAND "$<TARGET_FILE:ct_specific_nodes>")
set_tests_properties(ct_specific_nodes PROPERTIES LABELS "CT")

add_executable(ut_parse_cmd ut_parse_cmd.c test_utils.c)
target_link_libraries(ut_parse_cmd hiredis_cluster ${SSL_LIBRARY})
target_include_directories(ut_parse_cmd PRIVATE "${PROJECT_SOURCE_DIR}/src")
target_link_libraries(ut_parse_cmd valkey ${SSL_LIBRARY})
add_test(NAME ut_parse_cmd COMMAND "$<TARGET_FILE:ut_parse_cmd>")
set_tests_properties(ut_parse_cmd PROPERTIES LABELS "UT")

if(ENABLE_SSL)
# Executable: tls
add_executable(example_tls main_tls.c)
target_link_libraries(example_tls hiredis_cluster ${SSL_LIBRARY})
add_dependencies(example_tls generate_tls_configs)

# Executable: async tls
add_executable(example_async_tls main_async_tls.c)
target_link_libraries(example_async_tls hiredis_cluster ${SSL_LIBRARY} ${LIBEVENT_LIBRARY})
add_dependencies(example_async_tls generate_tls_configs)
endif()

if(LIBUV_LIBRARY)
add_executable(ct_async_libuv ct_async_libuv.c)
target_link_libraries(ct_async_libuv hiredis_cluster ${SSL_LIBRARY} ${LIBUV_LIBRARY})
target_link_libraries(ct_async_libuv valkey ${SSL_LIBRARY} ${LIBUV_LIBRARY})
add_test(NAME ct_async_libuv COMMAND "$<TARGET_FILE:ct_async_libuv>")
set_tests_properties(ct_async_libuv PROPERTIES LABELS "CT")
else()
Expand All @@ -134,9 +134,7 @@ endif()

if(LIBEV_LIBRARY)
add_executable(ct_async_libev ct_async_libev.c)
# Temporary remove warning of unused parameter due to an issue in hiredis libev adapter
target_compile_options(ct_async_libev PRIVATE -Wno-unused-parameter)
target_link_libraries(ct_async_libev hiredis_cluster ${SSL_LIBRARY} ${LIBEV_LIBRARY})
target_link_libraries(ct_async_libev valkey ${SSL_LIBRARY} ${LIBEV_LIBRARY})
add_test(NAME ct_async_libev COMMAND "$<TARGET_FILE:ct_async_libev>")
set_tests_properties(ct_async_libev PROPERTIES LABELS "CT")
else()
Expand All @@ -146,32 +144,32 @@ endif()

if(GLIB_LIBRARY_FOUND)
add_executable(ct_async_glib ct_async_glib.c)
target_link_libraries(ct_async_glib hiredis_cluster ${SSL_LIBRARY} PkgConfig::GLIB_LIBRARY)
target_link_libraries(ct_async_glib valkey ${SSL_LIBRARY} PkgConfig::GLIB_LIBRARY)
add_test(NAME ct_async_glib COMMAND "$<TARGET_FILE:ct_async_glib>")
set_tests_properties(ct_async_glib PROPERTIES LABELS "CT")
else()
add_test(NAME ct_async_glib COMMAND "")
set_tests_properties(ct_async_glib PROPERTIES DISABLED True)
endif()

# Tests using simulated redis node
# Tests using simulated Valkey node
add_executable(clusterclient clusterclient.c)
target_link_libraries(clusterclient hiredis_cluster ${SSL_LIBRARY})
target_link_libraries(clusterclient valkey ${SSL_LIBRARY})
add_executable(clusterclient_async clusterclient_async.c)
target_link_libraries(clusterclient_async hiredis_cluster ${SSL_LIBRARY} ${LIBEVENT_LIBRARY})
target_link_libraries(clusterclient_async valkey ${SSL_LIBRARY} ${LIBEVENT_LIBRARY})
add_executable(clusterclient_reconnect_async clusterclient_reconnect_async.c)
target_link_libraries(clusterclient_reconnect_async hiredis_cluster ${SSL_LIBRARY} ${LIBEVENT_LIBRARY})
target_link_libraries(clusterclient_reconnect_async valkey ${SSL_LIBRARY} ${LIBEVENT_LIBRARY})
add_test(NAME set-get-test
COMMAND "${CMAKE_SOURCE_DIR}/tests/scripts/set-get-test.sh"
"$<TARGET_FILE:clusterclient>"
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/tests/scripts/")
add_test(NAME set-get-test-async
COMMAND "${CMAKE_SOURCE_DIR}/tests/scripts/set-get-test.sh"
"$<TARGET_FILE:clusterclient_async>"
"$<TARGET_FILE:clusterclient_async>"
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/tests/scripts/")
add_test(NAME ask-redirect-test
COMMAND "${CMAKE_SOURCE_DIR}/tests/scripts/ask-redirect-test.sh"
"$<TARGET_FILE:clusterclient>"
"$<TARGET_FILE:clusterclient>"
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/tests/scripts/")
add_test(NAME ask-redirect-test-async
COMMAND "${CMAKE_SOURCE_DIR}/tests/scripts/ask-redirect-test.sh"
Expand All @@ -184,10 +182,10 @@ add_test(NAME ask-redirect-using-cluster-nodes-test-async
add_test(NAME moved-redirect-test
COMMAND "${CMAKE_SOURCE_DIR}/tests/scripts/moved-redirect-test.sh"
"$<TARGET_FILE:clusterclient>"
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/tests/scripts/")
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/tests/scripts/")
add_test(NAME moved-redirect-test-async
COMMAND "${CMAKE_SOURCE_DIR}/tests/scripts/moved-redirect-test.sh"
"$<TARGET_FILE:clusterclient_async>"
"$<TARGET_FILE:clusterclient_async>"
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/tests/scripts/")
add_test(NAME moved-redirect-using-cluster-nodes-test-async
COMMAND "${CMAKE_SOURCE_DIR}/tests/scripts/moved-redirect-using-cluster-nodes-test.sh"
Expand All @@ -196,23 +194,23 @@ add_test(NAME moved-redirect-using-cluster-nodes-test-async
add_test(NAME dbsize-to-all-nodes-test
COMMAND "${CMAKE_SOURCE_DIR}/tests/scripts/dbsize-to-all-nodes-test.sh"
"$<TARGET_FILE:clusterclient>"
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/tests/scripts/")
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/tests/scripts/")
add_test(NAME dbsize-to-all-nodes-test-async
COMMAND "${CMAKE_SOURCE_DIR}/tests/scripts/dbsize-to-all-nodes-test.sh"
"$<TARGET_FILE:clusterclient_async>"
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/tests/scripts/")
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/tests/scripts/")
add_test(NAME dbsize-to-all-nodes-during-scaledown-test
COMMAND "${CMAKE_SOURCE_DIR}/tests/scripts/dbsize-to-all-nodes-during-scaledown-test.sh"
"$<TARGET_FILE:clusterclient>"
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/tests/scripts/")
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/tests/scripts/")
add_test(NAME dbsize-to-all-nodes-during-scaledown-test-async
COMMAND "${CMAKE_SOURCE_DIR}/tests/scripts/dbsize-to-all-nodes-during-scaledown-test-async.sh"
"$<TARGET_FILE:clusterclient_async>"
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/tests/scripts/")
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/tests/scripts/")
add_test(NAME reconnect-test
COMMAND "${CMAKE_SOURCE_DIR}/tests/scripts/reconnect-test.sh"
"$<TARGET_FILE:clusterclient_reconnect_async>"
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/tests/scripts/")
"$<TARGET_FILE:clusterclient_reconnect_async>"
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/tests/scripts/")
add_test(NAME timeout-handling-test
COMMAND "${CMAKE_SOURCE_DIR}/tests/scripts/timeout-handling-test.sh"
"$<TARGET_FILE:clusterclient_async>"
Expand Down Expand Up @@ -253,15 +251,10 @@ if(NOT ENABLE_IPV6_TESTS)
set_tests_properties(redirect-with-ipv6-test PROPERTIES DISABLED True)
set_tests_properties(redirect-with-ipv6-async-test PROPERTIES DISABLED True)
endif()
# This test can't be run on hiredis v1.1.0 due to hiredis issue #1171.
# Disabling the testcase if hiredis contains the issue or if the version is unknown.
add_test(NAME redirect-with-hostname-test-async
COMMAND "${CMAKE_SOURCE_DIR}/tests/scripts/redirect-with-hostname-test.sh"
"$<TARGET_FILE:clusterclient_async>"
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/tests/scripts/")
if(hiredis_VERSION VERSION_EQUAL "1.1.0" OR hiredis_VERSION VERSION_EQUAL "0")
set_tests_properties(redirect-with-hostname-test-async PROPERTIES DISABLED True)
endif()
add_test(NAME cluster-scale-down-test
COMMAND "${CMAKE_SOURCE_DIR}/tests/scripts/cluster-scale-down-test.sh"
"$<TARGET_FILE:clusterclient>"
Expand Down
File renamed without changes.
Loading
Loading