Skip to content

Commit

Permalink
test creating cluster with --cluster_mode off
Browse files Browse the repository at this point in the history
Signed-off-by: TJ Zhang <[email protected]>
  • Loading branch information
TJ Zhang committed Oct 17, 2024
1 parent 4e27882 commit b0f9cc6
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions node/tests/ServerModules.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ import { ValkeyCluster } from "../../utils/TestUtils";
import {
flushAndCloseClient,
getClientConfigurationOption,
getServerVersion
getServerVersion,
parseCommandLineArgs,
parseEndpoints,
} from "./TestUtilities";

const TIMEOUT = 50000;
Expand All @@ -23,7 +25,14 @@ describe("GlideJson", () => {
let cluster: ValkeyCluster;
let client: GlideClusterClient;
beforeAll(async () => {
cluster = await ValkeyCluster.createCluster(false, 1, 1, getServerVersion);
const clusterAddresses = parseCommandLineArgs()["cluster-endpoints"];
cluster = clusterAddresses
? await ValkeyCluster.initFromExistingCluster(
false,
parseEndpoints(clusterAddresses),
getServerVersion,
)
: await ValkeyCluster.createCluster(false, 1, 1, getServerVersion);
}, 20000);

afterEach(async () => {
Expand Down

0 comments on commit b0f9cc6

Please sign in to comment.