feat(test-utils): add testAllAuto method for automatic cluster test generation#3148
Merged
nkaradzhov merged 1 commit intoredis:masterfrom Jan 6, 2026
Merged
Conversation
ffc5026 to
7e81c12
Compare
…eneration
Created a new `testAllAuto()` helper method in the test-utils package that automatically runs tests against both
single-node and cluster instances with auto-generated cluster configuration from client configuration.
Previously, tests only ran against single-node clients using `testWithClient()`. To test both scenarios, developers had
to either manually call `testWithCluster()` separately with hand-crafted cluster config, or use `testAll()` with both
client and cluster configurations defined.
The new `testAllAuto()` method converts client configuration to cluster configuration by separating cluster-level
properties (`modules`, `functions`, `scripts`) from client-level properties (`password`, `socket`, etc.), placing them
at `clusterConfiguration` level and `clusterConfiguration.defaults` respectively.
Example usage:
Before:
```
testUtils.testWithClient('client.ft.aggregate', async client => {...}, GLOBAL.SERVERS.OPEN)
```
After:
```
testUtils.testAllAuto('client.ft.aggregate', async client => {...}, GLOBAL.SERVERS.OPEN)
```
Changes:
- Added `testAllAuto()` method in packages/test-utils/lib/index.ts
- Updated AGGREGATE.spec.ts to use the new method as example
7e81c12 to
a3bcda1
Compare
nkaradzhov
approved these changes
Jan 6, 2026
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.
Created a new
testAllAuto()helper method in the test-utils package that automatically runs tests against both single-node and cluster instances with auto-generated cluster configuration from client configuration.Previously, tests only ran against single-node clients using
testWithClient(). To test both scenarios, developers had to either manually calltestWithCluster()separately with hand-crafted cluster config, or usetestAll()with both client and cluster configurations defined.The new
testAllAuto()method converts client configuration to cluster configuration by separating cluster-level properties (modules,functions,scripts) from client-level properties (password,socket, etc.), placing them atclusterConfigurationlevel andclusterConfiguration.defaultsrespectively.Example usage:
Before:
After:
Changes:
testAllAuto()method in packages/test-utils/lib/index.ts