File tree Expand file tree Collapse file tree 9 files changed +21
-56
lines changed
src/test/java/io/qdrant/client Expand file tree Collapse file tree 9 files changed +21
-56
lines changed Original file line number Diff line number Diff line change 8080def grpcVersion = ' 1.59.0'
8181def protobufVersion = ' 3.24.0'
8282def protocVersion = protobufVersion
83- def testContainersVersion = ' 1.19.2 '
83+ def testcontainersVersion = ' 1.19.6 '
8484def jUnitVersion = ' 5.8.1'
8585
8686dependencies {
@@ -102,8 +102,8 @@ dependencies {
102102 testImplementation " io.grpc:grpc-testing:${ grpcVersion} "
103103 testImplementation " org.junit.jupiter:junit-jupiter-api:${ jUnitVersion} "
104104 testImplementation " org.mockito:mockito-core:3.4.0"
105- testImplementation " org.testcontainers:testcontainers :${ testContainersVersion } "
106- testImplementation " org.testcontainers:junit-jupiter:${ testContainersVersion } "
105+ testImplementation " org.testcontainers:qdrant :${ testcontainersVersion } "
106+ testImplementation " org.testcontainers:junit-jupiter:${ testcontainersVersion } "
107107
108108 testRuntimeOnly " org.junit.jupiter:junit-jupiter-engine:${ jUnitVersion} "
109109}
Original file line number Diff line number Diff line change 1010import org .junit .jupiter .api .Test ;
1111import org .testcontainers .junit .jupiter .Container ;
1212import org .testcontainers .junit .jupiter .Testcontainers ;
13- import io . qdrant . client . container .QdrantContainer ;
13+ import org . testcontainers . qdrant .QdrantContainer ;
1414
1515import java .util .concurrent .ExecutionException ;
1616import java .util .concurrent .TimeUnit ;
2424@ Testcontainers
2525public class ApiKeyTest {
2626 @ Container
27- private static final QdrantContainer QDRANT_CONTAINER = new QdrantContainer (). withApiKey ( "password!" );
27+ private static final QdrantContainer QDRANT_CONTAINER = new QdrantContainer (DockerImage . QDRANT_IMAGE ). withEnv ( "QDRANT__SERVICE__API_KEY" , "password!" );
2828 private ManagedChannel channel ;
2929
3030 @ BeforeEach
Original file line number Diff line number Diff line change 1212import org .junit .jupiter .api .TestInfo ;
1313import org .testcontainers .junit .jupiter .Container ;
1414import org .testcontainers .junit .jupiter .Testcontainers ;
15- import io . qdrant . client . container .QdrantContainer ;
15+ import org . testcontainers . qdrant .QdrantContainer ;
1616
1717import java .util .Comparator ;
1818import java .util .List ;
3434@ Testcontainers
3535class CollectionsTest {
3636 @ Container
37- private static final QdrantContainer QDRANT_CONTAINER = new QdrantContainer ();
37+ private static final QdrantContainer QDRANT_CONTAINER = new QdrantContainer (DockerImage . QDRANT_IMAGE );
3838 private QdrantClient client ;
3939 private ManagedChannel channel ;
4040 private String testName ;
Original file line number Diff line number Diff line change 1+ package io .qdrant .client ;
2+
3+ public class DockerImage {
4+
5+ public static final String QDRANT_IMAGE = "qdrant/qdrant:" + System .getProperty ("qdrantVersion" );
6+ }
Original file line number Diff line number Diff line change 88import org .junit .jupiter .api .Test ;
99import org .testcontainers .junit .jupiter .Container ;
1010import org .testcontainers .junit .jupiter .Testcontainers ;
11- import io . qdrant . client . container .QdrantContainer ;
11+ import org . testcontainers . qdrant .QdrantContainer ;
1212
1313import java .util .concurrent .ExecutionException ;
1414import java .util .concurrent .TimeUnit ;
1919@ Testcontainers
2020class HealthTest {
2121 @ Container
22- private static final QdrantContainer QDRANT_CONTAINER = new QdrantContainer ();
22+ private static final QdrantContainer QDRANT_CONTAINER = new QdrantContainer (DockerImage . QDRANT_IMAGE );
2323 private QdrantClient client ;
2424 private ManagedChannel channel ;
2525
Original file line number Diff line number Diff line change 1212import org .testcontainers .shaded .com .google .common .collect .ImmutableList ;
1313import org .testcontainers .shaded .com .google .common .collect .ImmutableMap ;
1414import org .testcontainers .shaded .com .google .common .collect .ImmutableSet ;
15- import io . qdrant . client . container .QdrantContainer ;
15+ import org . testcontainers . qdrant .QdrantContainer ;
1616import io .qdrant .client .grpc .Points .DiscoverPoints ;
1717import io .qdrant .client .grpc .Points .PointVectors ;
1818import io .qdrant .client .grpc .Points .PointsIdsList ;
6161@ Testcontainers
6262class PointsTest {
6363 @ Container
64- private static final QdrantContainer QDRANT_CONTAINER = new QdrantContainer ();
64+ private static final QdrantContainer QDRANT_CONTAINER = new QdrantContainer (DockerImage . QDRANT_IMAGE );
6565 private QdrantClient client ;
6666 private ManagedChannel channel ;
6767 private String testName ;
Original file line number Diff line number Diff line change 88import org .junit .jupiter .api .Test ;
99import org .testcontainers .junit .jupiter .Container ;
1010import org .testcontainers .junit .jupiter .Testcontainers ;
11- import io . qdrant . client . container .QdrantContainer ;
11+ import org . testcontainers . qdrant .QdrantContainer ;
1212
1313import java .util .concurrent .ExecutionException ;
1414
1818class QdrantGrpcClientTest {
1919
2020 @ Container
21- private static final QdrantContainer QDRANT_CONTAINER = new QdrantContainer ();
21+ private static final QdrantContainer QDRANT_CONTAINER = new QdrantContainer (DockerImage . QDRANT_IMAGE );
2222 private QdrantGrpcClient client ;
2323
2424 @ BeforeEach
Original file line number Diff line number Diff line change 1212import org .junit .jupiter .api .TestInfo ;
1313import org .testcontainers .junit .jupiter .Container ;
1414import org .testcontainers .junit .jupiter .Testcontainers ;
15- import io . qdrant . client . container .QdrantContainer ;
15+ import org . testcontainers . qdrant .QdrantContainer ;
1616
1717import java .util .List ;
1818import java .util .concurrent .ExecutionException ;
2525@ Testcontainers
2626class SnapshotsTest {
2727 @ Container
28- private static final QdrantContainer QDRANT_CONTAINER = new QdrantContainer ();
28+ private static final QdrantContainer QDRANT_CONTAINER = new QdrantContainer (DockerImage . QDRANT_IMAGE );
2929 private QdrantClient client ;
3030 private ManagedChannel channel ;
3131 private String testName ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments