test: run the standard command integration tests against an external Redis Enterprise database - #3846
Open
kiryazovi-redis wants to merge 2 commits into
Open
test: run the standard command integration tests against an external Redis Enterprise database#3846kiryazovi-redis wants to merge 2 commits into
kiryazovi-redis wants to merge 2 commits into
Conversation
…rise database Add RedisEnterpriseSettings, which resolves the target database (RE_DB_NAME, default "standalone") from REDIS_ENDPOINTS_CONFIG_PATH when RE_CLUSTER=true, and route TestSettings host/port/username/password and the default test client's auth/TLS through it. When RE_CLUSTER is unset, behaviour is unchanged (localhost defaults, no auth). This change was prepared with AI assistance and reviewed before submission.
Add a @DisabledOnRedisEnterprise JUnit condition (active when RE_CLUSTER=true) and apply it to the command integration specs that cannot run against a managed Redis Enterprise database, each with a rationale: - ACL / ConsolidatedAcl (ACL SETUSER / user management not permitted for the default user) - ConsolidatedConfiguration and ServerCommand (CONFIG / SLAVEOF / BGSAVE / SLOWLOG / CLIENT NO-EVICT and other server-admin commands are restricted) - Hotkeys (requires CONFIG of maxmemory-policy) - GeoMasterReplica (requires a local master-replica topology) - CommandInterfaces#issue2612 (connects to a hardcoded localhost Redis Stack instance) - KeyCommand copy-across-db / move / objectFreq (cross-DB and CONFIG-dependent) - StringCommand INCREX specs (OSS preview command not implemented on RE) With RE_CLUSTER unset the annotation has no effect. Verified against a managed Redis Enterprise 8.x database: 738 run, 0 failures, 0 errors, 148 skipped. This change was prepared with AI assistance and reviewed before submission.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The standard
io.lettuce.core.commands.*IntegrationTestsassume a passwordless Redis reachable on localhost. This change lets the same tests also run against an external / managed Redis Enterprise database - remote host, authentication, and optional TLS - without changing the existing local behaviour.What changed
RE_CLUSTER=true, a newRedisEnterpriseSettingsresolves the target database (host, port, username, password, TLS) fromREDIS_ENDPOINTS_CONFIG_PATH(the same endpoints-config format already consumed by the scenario tests;RE_DB_NAMEselects a named database, defaultstandalone).TestSettingsand the default test client (DefaultRedisClient) route through it, so the injected connection targets the managed database with auth/TLS. WhenRE_CLUSTERis unset, behaviour is unchanged (localhost defaults, no auth).@DisabledOnRedisEnterprise- a new JUnit condition (active only whenRE_CLUSTER=true) applied to the specs that cannot run against a managed Enterprise database, each with a rationale: ACL / ConsolidatedAcl (user management), ConsolidatedConfiguration and ServerCommand (CONFIG / SLAVEOF / BGSAVE / SLOWLOG / CLIENT NO-EVICT server-admin), Hotkeys (CONFIG-dependent), GeoMasterReplica (needs a local master-replica topology), CommandInterfaces#issue2612 (hardcoded localhost Stack instance), KeyCommand copy-across-db / move / objectFreq (cross-DB + CONFIG), and the StringCommand INCREX specs (OSS preview command).Validation
Ran the command integration suite against a managed Redis Enterprise 8.x database: 738 run, 0 failures, 0 errors, 148 skipped. With
RE_CLUSTERunset the suite still targets localhost unchanged.This change was prepared with AI assistance and reviewed before submission.
Note
Low Risk
Changes are limited to test infrastructure and conditional test skipping; production library code is untouched.
Overview
Adds opt-in Redis Enterprise targeting for the standard command integration suite. When
RE_CLUSTER=true, newRedisEnterpriseSettingsloads host, port, credentials, and TLS fromREDIS_ENDPOINTS_CONFIG_PATH(viaRE_DB_NAME, defaultstandalone).TestSettingsandDefaultRedisClientuse that endpoint and apply auth/TLS on the default client; withoutRE_CLUSTER, localhost behavior is unchanged.Introduces
@DisabledOnRedisEnterprise(JUnitExecutionConditiongated onRE_CLUSTER) and applies it to specs that assume OSS-only admin, multi-DB, local topology, hardcoded Stack on127.0.0.1:16379, or OSS preview commands—whole classes (ACL, server admin, CONFIG, HOTKEYS, master-replica, etc.) and selective methods (cross-DB COPY/MOVE,objectFreq, all INCREX tests).Reviewed by Cursor Bugbot for commit 564d78b. Bugbot is set up for automated code reviews on this repo. Configure here.