Skip to content

Commit a697c4a

Browse files
committed
test(opensearch): Add failing test case for security disabled support
1 parent 4d40593 commit a697c4a

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

packages/modules/opensearch/src/opensearch-container.test.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,23 @@ describe("OpenSearchContainer", { timeout: 180_000 }, () => {
102102
const { body } = await client.indices.exists({ index: "people" });
103103
expect(body).toBe(true);
104104
});
105+
106+
it("should be reachable with security disabled", async () => {
107+
// opensearchCustomPassword {
108+
await using container = await new OpenSearchContainer(IMAGE).withSecurityEnabled(false).start();
109+
// }
110+
111+
const client = new Client({
112+
node: container.getHttpUrl(),
113+
auth: {
114+
username: container.getUsername(),
115+
password: container.getPassword(),
116+
},
117+
});
118+
119+
await client.indices.create({ index: "people" });
120+
121+
const { body } = await client.indices.exists({ index: "people" });
122+
expect(body).toBe(true);
123+
});
105124
});

0 commit comments

Comments
 (0)