module test added for sum-transformer
@@ -28,6 +28,8 @@ const (
envTestText2vecContextionaryImage = "TEST_TEXT2VEC_CONTEXTIONARY_IMAGE"
// envTestQnATransformersImage adds ability to pass a custom image to module tests
envTestQnATransformersImage = "TEST_QNA_TRANSFORMERS_IMAGE"
+ // envTestSUMTransformersImage adds ability to pass a custom image to module tests
+ envTestSUMTransformersImage = "TEST_SUM_TRANSFORMERS_IMAGE"
)
type Compose struct {
@@ -39,6 +41,7 @@ type Compose struct {
withContextionary bool
withQnATransformers bool
withWeaviate bool
+ withSUMTransformers bool
}
func New() *Compose {
@@ -75,6 +78,12 @@ func (d *Compose) WithQnATransformers() *Compose {
return d
}
+func (d *Compose) WithSUMTransformers() *Compose {
+ d.withSUMTransformers = true
+ d.enableModules = append(d.enableModules, SUMTransformers)
+ return d
+}
+
func (d *Compose) WithWeaviate() *Compose {
d.withWeaviate = true
return d
@@ -140,6 +149,17 @@ func (d *Compose) Start(ctx context.Context) (*DockerCompose, error) {
}
containers = append(containers, container)
}
+ if d.withSUMTransformers {
+ image := os.Getenv(envTestSUMTransformersImage)
+ container, err := startSUMTransformers(ctx, networkName, image)
+ if err != nil {
+ return nil, errors.Wrapf(err, "start %s", SUMTransformers)
+ }
+ for k, v := range container.envSettings {
+ envSettings[k] = v
+ }
+ containers = append(containers, container)
+ }
if d.withWeaviate {
image := os.Getenv(envTestWeaviateImage)
container, err := startWeaviate(ctx, d.enableModules, d.defaultVectorizerModule,
