Skip to content

Commit 44fde88

Browse files
committed
ci: add 1.31.0 to the text matrix
Run the new integration test only if the server is > 1.31.0
1 parent d709622 commit 44fde88

File tree

2 files changed

+22
-18
lines changed

2 files changed

+22
-18
lines changed

.github/workflows/main.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ env:
1414
WEAVIATE_128: 1.28.11
1515
WEAVIATE_129: 1.29.1
1616
WEAVIATE_130: 1.30.1
17+
WEAVIATE_131: 1.31.0
1718

1819
concurrency:
1920
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}

src/collections/config/integration.test.ts

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/* eslint-disable @typescript-eslint/no-non-null-assertion */
2+
import { requireAtLeast } from '../../../test/version.js';
23
import { WeaviateUnsupportedFeatureError } from '../../errors.js';
34
import weaviate, { WeaviateClient, weaviateV2 } from '../../index.js';
45
import {
@@ -386,25 +387,27 @@ describe('Testing of the collection.config namespace', () => {
386387
]);
387388
});
388389

389-
it('should be able to add a reference to a collection', async () => {
390-
const collectionName = 'TestCollectionConfigAddVector' as const;
391-
const collection = await client.collections.create({
392-
name: collectionName,
393-
vectorizers: [weaviate.configure.vectorizer.none({ name: 'original' })],
390+
requireAtLeast(1, 31, 0)('Mutable named vectors', () => {
391+
it('should be able to add named vectors to a collection', async () => {
392+
const collectionName = 'TestCollectionConfigAddVector' as const;
393+
const collection = await client.collections.create({
394+
name: collectionName,
395+
vectorizers: [weaviate.configure.vectorizer.none({ name: 'original' })],
396+
});
397+
// Add a single named vector
398+
await collection.config.addVector(weaviate.configure.vectorizer.none({ name: 'vector-a' }));
399+
400+
// Add several named vectors
401+
await collection.config.addVector([
402+
weaviate.configure.vectorizer.none({ name: 'vector-b' }),
403+
weaviate.configure.vectorizer.none({ name: 'vector-c' }),
404+
]);
405+
406+
const config = await collection.config.get();
407+
expect(config.vectorizers).toHaveProperty('vector-a');
408+
expect(config.vectorizers).toHaveProperty('vector-b');
409+
expect(config.vectorizers).toHaveProperty('vector-c');
394410
});
395-
// Add a single named vector
396-
await collection.config.addVector(weaviate.configure.vectorizer.none({ name: 'vector-a' }));
397-
398-
// Add several named vectors
399-
await collection.config.addVector([
400-
weaviate.configure.vectorizer.none({ name: 'vector-b' }),
401-
weaviate.configure.vectorizer.none({ name: 'vector-c' }),
402-
]);
403-
404-
const config = await collection.config.get();
405-
expect(config.vectorizers).toHaveProperty('vector-a');
406-
expect(config.vectorizers).toHaveProperty('vector-b');
407-
expect(config.vectorizers).toHaveProperty('vector-c');
408411
});
409412

410413
it('should get the shards of a sharded collection', async () => {

0 commit comments

Comments
 (0)