You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-12-14 09:42:12 +03:00
tests: Adjust scenario tests according to latest maint naming changes (#3090)
* rename maint options according to the latest client options * adjust env variables cae repo uses RE_FAULT_INJECTOR_URL for fault injector DATABASE_NAME is needed to choose from the many databases in cae * fix connection cleanup test
This commit is contained in:
committed by
GitHub
parent
0438865b8a
commit
adb19c5c5f
@@ -43,13 +43,13 @@ export function getEnvConfig(): EnvConfig {
|
||||
);
|
||||
}
|
||||
|
||||
if (!process.env.FAULT_INJECTION_API_URL) {
|
||||
throw new Error("FAULT_INJECTION_API_URL environment variable must be set");
|
||||
if (!process.env.RE_FAULT_INJECTOR_URL) {
|
||||
throw new Error("RE_FAULT_INJECTOR_URL environment variable must be set");
|
||||
}
|
||||
|
||||
return {
|
||||
redisEndpointsConfigPath: process.env.REDIS_ENDPOINTS_CONFIG_PATH,
|
||||
faultInjectorUrl: process.env.FAULT_INJECTION_API_URL,
|
||||
faultInjectorUrl: process.env.RE_FAULT_INJECTOR_URL,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ export interface RedisConnectionConfig {
|
||||
*/
|
||||
export function getDatabaseConfig(
|
||||
databasesConfig: DatabasesConfig,
|
||||
databaseName?: string
|
||||
databaseName = process.env.DATABASE_NAME
|
||||
): RedisConnectionConfig {
|
||||
const dbConfig = databaseName
|
||||
? databasesConfig[databaseName]
|
||||
@@ -163,8 +163,8 @@ export async function createTestClient(
|
||||
password: clientConfig.password,
|
||||
username: clientConfig.username,
|
||||
RESP: 3,
|
||||
maintPushNotifications: "auto",
|
||||
maintMovingEndpointType: "auto",
|
||||
maintNotifications: "auto",
|
||||
maintEndpointType: "auto",
|
||||
...options,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user