Skip to content

Conversation

@bobymicroby
Copy link
Member

@bobymicroby bobymicroby commented Dec 16, 2025

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

@bobymicroby bobymicroby changed the title feat(test-utils): add testAllAuto method for automatic cluster test generation [WIP] feat(test-utils): add testAllAuto method for automatic cluster test generation Dec 16, 2025
@bobymicroby bobymicroby force-pushed the test-all-auto branch 2 times, most recently from ffc5026 to 7e81c12 Compare January 5, 2026 13:36
…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
@bobymicroby bobymicroby changed the title [WIP] feat(test-utils): add testAllAuto method for automatic cluster test generation feat(test-utils): add testAllAuto method for automatic cluster test generation Jan 6, 2026
@nkaradzhov nkaradzhov merged commit 1dee8de into redis:master Jan 6, 2026
17 checks passed
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.

2 participants