Skip to content

test: run the standard command integration tests against an external Redis Enterprise database - #3846

Open
kiryazovi-redis wants to merge 2 commits into
redis:mainfrom
kiryazovi-redis:fix/re-endpoints-config
Open

test: run the standard command integration tests against an external Redis Enterprise database#3846
kiryazovi-redis wants to merge 2 commits into
redis:mainfrom
kiryazovi-redis:fix/re-endpoints-config

Conversation

@kiryazovi-redis

@kiryazovi-redis kiryazovi-redis commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Motivation

The standard io.lettuce.core.commands.*IntegrationTests assume 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

  • Opt-in endpoint discovery. When RE_CLUSTER=true, a new RedisEnterpriseSettings resolves the target database (host, port, username, password, TLS) from REDIS_ENDPOINTS_CONFIG_PATH (the same endpoints-config format already consumed by the scenario tests; RE_DB_NAME selects a named database, default standalone). TestSettings and the default test client (DefaultRedisClient) route through it, so the injected connection targets the managed database with auth/TLS. When RE_CLUSTER is unset, behaviour is unchanged (localhost defaults, no auth).
  • @DisabledOnRedisEnterprise - a new JUnit condition (active only when RE_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_CLUSTER unset 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, new RedisEnterpriseSettings loads host, port, credentials, and TLS from REDIS_ENDPOINTS_CONFIG_PATH (via RE_DB_NAME, default standalone). TestSettings and DefaultRedisClient use that endpoint and apply auth/TLS on the default client; without RE_CLUSTER, localhost behavior is unchanged.

Introduces @DisabledOnRedisEnterprise (JUnit ExecutionCondition gated on RE_CLUSTER) and applies it to specs that assume OSS-only admin, multi-DB, local topology, hardcoded Stack on 127.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.

…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant