You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-09 00:22:08 +03:00
chore(tests): bump test container version 8.2 (#3046)
This commit is contained in:
committed by
GitHub
parent
12f7d8a7fe
commit
6406172ea8
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node-version: ["18", "20", "22"]
|
||||
redis-version: ["rs-7.4.0-v1", "8.0.2", "8.2-rc2-pre"]
|
||||
redis-version: ["rs-7.4.0-v1", "8.0.2", "8.2"]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
|
@@ -241,7 +241,7 @@ Node Redis v5 adds support for [Client Side Caching](https://redis.io/docs/manua
|
||||
```typescript
|
||||
// Enable client side caching with RESP3
|
||||
const client = createClient({
|
||||
RESP: 3,
|
||||
RESP: 3,
|
||||
clientSideCache: {
|
||||
ttl: 0, // Time-to-live (0 = no expiration)
|
||||
maxEntries: 0, // Maximum entries (0 = unlimited)
|
||||
@@ -304,6 +304,7 @@ Node Redis is supported with the following versions of Redis:
|
||||
|
||||
| Version | Supported |
|
||||
| ------- | ------------------ |
|
||||
| 8.2.z | :heavy_check_mark: |
|
||||
| 8.0.z | :heavy_check_mark: |
|
||||
| 7.4.z | :heavy_check_mark: |
|
||||
| 7.2.z | :heavy_check_mark: |
|
||||
|
@@ -4,7 +4,7 @@ import RedisBloomModules from '.';
|
||||
export default TestUtils.createFromConfig({
|
||||
dockerImageName: 'redislabs/client-libs-test',
|
||||
dockerImageVersionArgument: 'redis-version',
|
||||
defaultDockerVersion: '8.2-rc2-pre'
|
||||
defaultDockerVersion: '8.2'
|
||||
});
|
||||
|
||||
export const GLOBAL = {
|
||||
|
@@ -174,16 +174,16 @@ export class SentinelFramework extends DockerBase {
|
||||
this.#testUtils = TestUtils.createFromConfig({
|
||||
dockerImageName: 'redislabs/client-libs-test',
|
||||
dockerImageVersionArgument: 'redis-version',
|
||||
defaultDockerVersion: '8.2-rc2-pre'
|
||||
defaultDockerVersion: '8.2'
|
||||
});
|
||||
this.#nodeMap = new Map<string, ArrayElement<Awaited<ReturnType<SentinelFramework['spawnRedisSentinelNodes']>>>>();
|
||||
this.#sentinelMap = new Map<string, ArrayElement<Awaited<ReturnType<SentinelFramework['spawnRedisSentinelSentinels']>>>>();
|
||||
}
|
||||
|
||||
getSentinelClient(opts?: Partial<RedisSentinelOptions<RedisModules,
|
||||
getSentinelClient(opts?: Partial<RedisSentinelOptions<RedisModules,
|
||||
RedisFunctions,
|
||||
RedisScripts,
|
||||
RespVersions,
|
||||
RespVersions,
|
||||
TypeMapping>>, errors = true) {
|
||||
if (opts?.sentinelRootNodes !== undefined) {
|
||||
throw new Error("cannot specify sentinelRootNodes here");
|
||||
@@ -252,7 +252,7 @@ export class SentinelFramework extends DockerBase {
|
||||
|
||||
protected async spawnRedisSentinelNodes(replicasCount: number) {
|
||||
const master = await this.#testUtils.spawnRedisServer({serverArguments: DEBUG_MODE_ARGS})
|
||||
|
||||
|
||||
const replicas: Array<RedisServerDocker> = []
|
||||
for (let i = 0; i < replicasCount; i++) {
|
||||
const replica = await this.#testUtils.spawnRedisServer({serverArguments: DEBUG_MODE_ARGS})
|
||||
@@ -282,7 +282,7 @@ export class SentinelFramework extends DockerBase {
|
||||
async getAllRunning() {
|
||||
for (const port of this.getAllNodesPort()) {
|
||||
let first = true;
|
||||
while (await isPortAvailable(port)) {
|
||||
while (await isPortAvailable(port)) {
|
||||
if (!first) {
|
||||
console.log(`problematic restart ${port}`);
|
||||
await setTimeout(500);
|
||||
@@ -295,7 +295,7 @@ export class SentinelFramework extends DockerBase {
|
||||
|
||||
for (const port of this.getAllSentinelsPort()) {
|
||||
let first = true;
|
||||
while (await isPortAvailable(port)) {
|
||||
while (await isPortAvailable(port)) {
|
||||
if (!first) {
|
||||
await setTimeout(500);
|
||||
} else {
|
||||
@@ -325,7 +325,7 @@ export class SentinelFramework extends DockerBase {
|
||||
await client.connect();
|
||||
await client.replicaOf("127.0.0.1", masterPort);
|
||||
await client.close();
|
||||
|
||||
|
||||
|
||||
this.#nodeList.push(replica);
|
||||
this.#nodeMap.set(replica.port.toString(), replica);
|
||||
@@ -333,9 +333,9 @@ export class SentinelFramework extends DockerBase {
|
||||
|
||||
async getMaster(tracer?: Array<string>): Promise<string | undefined> {
|
||||
const client = RedisClient.create({
|
||||
name: this.config.sentinelName,
|
||||
name: this.config.sentinelName,
|
||||
socket: {
|
||||
host: "127.0.0.1",
|
||||
host: "127.0.0.1",
|
||||
port: this.#sentinelList[0].port,
|
||||
},
|
||||
modules: RedisSentinelModule,
|
||||
@@ -464,9 +464,9 @@ export class SentinelFramework extends DockerBase {
|
||||
|
||||
async sentinelSentinels() {
|
||||
const client = RedisClient.create({
|
||||
name: this.config.sentinelName,
|
||||
name: this.config.sentinelName,
|
||||
socket: {
|
||||
host: "127.0.0.1",
|
||||
host: "127.0.0.1",
|
||||
port: this.#sentinelList[0].port,
|
||||
},
|
||||
modules: RedisSentinelModule,
|
||||
@@ -480,9 +480,9 @@ export class SentinelFramework extends DockerBase {
|
||||
|
||||
async sentinelMaster() {
|
||||
const client = RedisClient.create({
|
||||
name: this.config.sentinelName,
|
||||
name: this.config.sentinelName,
|
||||
socket: {
|
||||
host: "127.0.0.1",
|
||||
host: "127.0.0.1",
|
||||
port: this.#sentinelList[0].port,
|
||||
},
|
||||
modules: RedisSentinelModule,
|
||||
@@ -496,9 +496,9 @@ export class SentinelFramework extends DockerBase {
|
||||
|
||||
async sentinelReplicas() {
|
||||
const client = RedisClient.create({
|
||||
name: this.config.sentinelName,
|
||||
name: this.config.sentinelName,
|
||||
socket: {
|
||||
host: "127.0.0.1",
|
||||
host: "127.0.0.1",
|
||||
port: this.#sentinelList[0].port,
|
||||
},
|
||||
modules: RedisSentinelModule,
|
||||
@@ -509,4 +509,4 @@ export class SentinelFramework extends DockerBase {
|
||||
|
||||
return replicas
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@ import RedisBloomModules from '@redis/bloom';
|
||||
const utils = TestUtils.createFromConfig({
|
||||
dockerImageName: 'redislabs/client-libs-test',
|
||||
dockerImageVersionArgument: 'redis-version',
|
||||
defaultDockerVersion: '8.2-rc2-pre'
|
||||
defaultDockerVersion: '8.2'
|
||||
});
|
||||
|
||||
export default utils;
|
||||
|
@@ -6,7 +6,7 @@ import { EntraidCredentialsProvider } from './entraid-credentials-provider';
|
||||
export const testUtils = TestUtils.createFromConfig({
|
||||
dockerImageName: 'redislabs/client-libs-test',
|
||||
dockerImageVersionArgument: 'redis-version',
|
||||
defaultDockerVersion: '8.2-rc2-pre'
|
||||
defaultDockerVersion: '8.2'
|
||||
});
|
||||
|
||||
const DEBUG_MODE_ARGS = testUtils.isVersionGreaterThan([7]) ?
|
||||
|
@@ -4,7 +4,7 @@ import RedisJSON from '.';
|
||||
export default TestUtils.createFromConfig({
|
||||
dockerImageName: 'redislabs/client-libs-test',
|
||||
dockerImageVersionArgument: 'redis-version',
|
||||
defaultDockerVersion: '8.2-rc2-pre'
|
||||
defaultDockerVersion: '8.2'
|
||||
});
|
||||
|
||||
export const GLOBAL = {
|
||||
|
@@ -5,7 +5,7 @@ import { RespVersions } from '@redis/client';
|
||||
export default TestUtils.createFromConfig({
|
||||
dockerImageName: 'redislabs/client-libs-test',
|
||||
dockerImageVersionArgument: 'redis-version',
|
||||
defaultDockerVersion: '8.2-rc2-pre'
|
||||
defaultDockerVersion: '8.2'
|
||||
});
|
||||
|
||||
export const GLOBAL = {
|
||||
|
@@ -4,7 +4,7 @@ import TimeSeries from '.';
|
||||
export default TestUtils.createFromConfig({
|
||||
dockerImageName: 'redislabs/client-libs-test',
|
||||
dockerImageVersionArgument: 'redis-version',
|
||||
defaultDockerVersion: '8.2-rc2-pre'
|
||||
defaultDockerVersion: '8.2'
|
||||
});
|
||||
|
||||
export const GLOBAL = {
|
||||
|
Reference in New Issue
Block a user