Skip to content

Commit e8b821d

Browse files
committed
Fix test adding env var to CI and update CI images
1 parent 4d1ec56 commit e8b821d

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

.github/workflows/main.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ on:
77
pull_request:
88

99
env:
10-
WEAVIATE_124: stable-v1.24-a8b364e
11-
WEAVIATE_125: 1.25.21
10+
WEAVIATE_124: 1.24.26
11+
WEAVIATE_125: 1.25.22
1212
WEAVIATE_126: 1.26.7
13-
WEAVIATE_127: 1.27.0
13+
WEAVIATE_127: stable-v1.27-ce73cd1
1414

1515
jobs:
1616
checks:
@@ -63,7 +63,7 @@ jobs:
6363
- name: "Run tests without authentication tests (for forks)"
6464
if: ${{ github.event.pull_request.head.repo.fork }}
6565
run: |
66-
npm test
66+
WEAVIATE_VERSION=${{ matrix.versions.weaviate }} npm test
6767
npm run build
6868
- name: "Stop Weaviate"
6969
run: ci/stop_dependencies.sh ${{ matrix.versions.weaviate }}

src/connection/integration.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
import { GenericContainer, StartedTestContainer } from 'testcontainers';
22
import weaviate from '..';
33
import { WeaviateStartUpError } from '../errors';
4+
import { Meta } from '../openapi/types';
5+
import { DbVersion } from '../utils/dbVersion';
46

57
describe('Integration testing of the ConnectionGRPC class', () => {
68
let container: StartedTestContainer;
9+
10+
const getVersion = () =>
11+
fetch(`http://${container.getHost()}:${container.getMappedPort(8080)}/v1/meta`)
12+
.then((res) => res.json() as Promise<Meta>)
13+
.then((meta) => DbVersion.fromString(meta.version!));
14+
715
beforeAll(async () => {
816
container = await new GenericContainer(`semitechnologies/weaviate:${process.env.WEAVIATE_VERSION}`)
917
.withExposedPorts(8080, 50051)
@@ -13,17 +21,20 @@ describe('Integration testing of the ConnectionGRPC class', () => {
1321
.start();
1422
});
1523
it('should fail to startup due to message-size limit', async () => {
24+
const dbVersion = await getVersion();
1625
try {
1726
await weaviate.connectToLocal({
1827
host: container.getHost(),
1928
port: container.getMappedPort(8080),
2029
grpcPort: container.getMappedPort(50051),
2130
});
31+
expect(dbVersion.isLowerThan(1, 27, 0)).toBe(true); // change to 1.27.1 when it lands
2232
} catch (err) {
2333
expect(err).toBeInstanceOf(WeaviateStartUpError);
2434
expect((err as WeaviateStartUpError).message).toContain(
2535
'RESOURCE_EXHAUSTED: Attempted to send message with a size larger than 1'
2636
);
37+
expect(dbVersion.isAtLeast(1, 27, 0)).toBe(true); // change to 1.27.1 when it lands
2738
}
2839
});
2940
});

0 commit comments

Comments
 (0)