1- import { GenericContainer , StartedTestContainer } from 'testcontainers' ;
1+ import { StartedWeaviateContainer , WeaviateContainer } from '@ testcontainers/weaviate ' ;
22import weaviate from '..' ;
33import { WeaviateStartUpError } from '../errors' ;
44import { Meta } from '../openapi/types' ;
55import { DbVersion } from '../utils/dbVersion' ;
66
77describe ( 'Integration testing of the ConnectionGRPC class' , ( ) => {
8- let container : StartedTestContainer ;
8+ let container : StartedWeaviateContainer ;
99
1010 const getVersion = ( ) =>
1111 fetch ( `http://${ container . getHost ( ) } :${ container . getMappedPort ( 8080 ) } /v1/meta` )
1212 . then ( ( res ) => res . json ( ) as Promise < Meta > )
1313 . then ( ( meta ) => DbVersion . fromString ( meta . version ! ) ) ;
1414
1515 beforeAll ( async ( ) => {
16- container = await new GenericContainer ( `semitechnologies/weaviate:${ process . env . WEAVIATE_VERSION } ` )
16+ container = await new WeaviateContainer ( `semitechnologies/weaviate:${ process . env . WEAVIATE_VERSION } ` )
1717 . withExposedPorts ( 8080 , 50051 )
1818 . withEnvironment ( {
1919 GRPC_MAX_MESSAGE_SIZE : '1' ,
@@ -32,13 +32,13 @@ describe('Integration testing of the ConnectionGRPC class', () => {
3232 port : container . getMappedPort ( 8080 ) ,
3333 grpcPort : container . getMappedPort ( 50051 ) ,
3434 } ) ;
35- expect ( dbVersion . isLowerThan ( 1 , 27 , 0 ) ) . toBe ( true ) ; // TODO: change to 1.27.1 when it lands
35+ expect ( dbVersion . isLowerThan ( 1 , 27 , 1 ) ) . toBe ( true ) ;
3636 } catch ( err ) {
3737 expect ( err ) . toBeInstanceOf ( WeaviateStartUpError ) ;
3838 expect ( ( err as WeaviateStartUpError ) . message ) . toContain (
3939 'RESOURCE_EXHAUSTED: Attempted to send message with a size larger than 1'
4040 ) ;
41- expect ( dbVersion . isAtLeast ( 1 , 27 , 0 ) ) . toBe ( true ) ; // TODO: change to 1.27.1 when it lands
41+ expect ( dbVersion . isAtLeast ( 1 , 27 , 1 ) ) . toBe ( true ) ;
4242 }
4343 } ) ;
4444} ) ;
0 commit comments