Skip to content

Commit 03f57af

Browse files
committed
Update
1 parent a132212 commit 03f57af

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/redis-client/redis-client-sentinel.test.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,5 +86,17 @@ describe("Redis Client (Sentinel)", () => {
8686
}),
8787
);
8888
});
89+
90+
it("returns undefined if master name not found", async () => {
91+
cds.env.requires.redis = {
92+
credentials: {
93+
sentinel_nodes: [{ hostname: "sentinel.local" }],
94+
},
95+
};
96+
97+
const redisClient = RedisClient.create("no-master-test");
98+
const client = await redisClient.createMainClientAndConnect();
99+
expect(client).toBeUndefined();
100+
});
89101
});
90102
});

0 commit comments

Comments
 (0)