Skip to content

Commit b6faf5d

Browse files
authored
Update docs to demonstrate specifying Qdrant version (#917)
1 parent 832c74d commit b6faf5d

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

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

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ describe("QdrantContainer", () => {
88

99
// connectQdrantSimple {
1010
it("should connect to the client", async () => {
11-
const container = await new QdrantContainer().start();
11+
const container = await new QdrantContainer("qdrant/qdrant:v1.13.4").start();
1212

1313
const client = new QdrantClient({ url: `http://${container.getRestHostAddress()}` });
1414

@@ -22,7 +22,7 @@ describe("QdrantContainer", () => {
2222
it("should work with valid API keys", async () => {
2323
const apiKey = crypto.randomUUID();
2424

25-
const container = await new QdrantContainer().withApiKey(apiKey).start();
25+
const container = await new QdrantContainer("qdrant/qdrant:v1.13.4").withApiKey(apiKey).start();
2626

2727
const client = new QdrantClient({ url: `http://${container.getRestHostAddress()}`, apiKey });
2828

@@ -35,21 +35,23 @@ describe("QdrantContainer", () => {
3535
it("should fail for invalid API keys", async () => {
3636
const apiKey = crypto.randomUUID();
3737

38-
const container = await new QdrantContainer().withApiKey(apiKey).start();
38+
const container = await new QdrantContainer("qdrant/qdrant:v1.13.4").withApiKey(apiKey).start();
3939

4040
const client = new QdrantClient({
4141
url: `http://${container.getRestHostAddress()}`,
4242
apiKey: "INVALID_KEY_" + crypto.randomUUID(),
4343
});
4444

45-
expect(client.getCollections()).rejects.toThrow("Forbidden");
45+
expect(client.getCollections()).rejects.toThrow("Unauthorized");
4646

4747
await container.stop();
4848
});
4949

5050
// connectQdrantWithConfig {
5151
it("should work with config files - valid API key", async () => {
52-
const container = await new QdrantContainer().withConfigFile(path.resolve(__dirname, "test_config.yaml")).start();
52+
const container = await new QdrantContainer("qdrant/qdrant:v1.13.4")
53+
.withConfigFile(path.resolve(__dirname, "test_config.yaml"))
54+
.start();
5355

5456
const client = new QdrantClient({ url: `http://${container.getRestHostAddress()}`, apiKey: "SOME_TEST_KEY" });
5557

@@ -60,14 +62,16 @@ describe("QdrantContainer", () => {
6062
// }
6163

6264
it("should work with config files - invalid API key", async () => {
63-
const container = await new QdrantContainer().withConfigFile(path.resolve(__dirname, "test_config.yaml")).start();
65+
const container = await new QdrantContainer("qdrant/qdrant:v1.13.4")
66+
.withConfigFile(path.resolve(__dirname, "test_config.yaml"))
67+
.start();
6468

6569
const client = new QdrantClient({
6670
url: `http://${container.getRestHostAddress()}`,
6771
apiKey: "INVALID_KEY_" + crypto.randomUUID(),
6872
});
6973

70-
expect(client.getCollections()).rejects.toThrow("Forbidden");
74+
expect(client.getCollections()).rejects.toThrow("Unauthorized");
7175

7276
await container.stop();
7377
});

packages/modules/qdrant/src/qdrant-container.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export class QdrantContainer extends GenericContainer {
88
private apiKey: string | undefined;
99
private configFilePath: string | undefined;
1010

11-
constructor(image = "qdrant/qdrant:v1.8.1") {
11+
constructor(image = "qdrant/qdrant:v1.13.4") {
1212
super(image);
1313
this.withExposedPorts(QDRANT_REST_PORT, QDRANT_GRPC_PORT);
1414
this.withWaitStrategy(

0 commit comments

Comments
 (0)