Fix TransformersEmbeddingModelAutoConfigurationIT

- Update the right settings to enable the configuration properties
This commit is contained in:
Ilayaperumal Gopinathan
2025-03-25 06:46:31 +00:00
parent c11cc739b3
commit 958dbd3089

View File

@@ -92,12 +92,12 @@ public class TransformersEmbeddingModelAutoConfigurationIT {
@Test
void embeddingActivation() {
this.contextRunner.withPropertyValues("spring.ai.embedding.transformer.enabled=false").run(context -> {
assertThat(context.getBeansOfType(TransformersEmbeddingModelProperties.class)).isNotEmpty();
this.contextRunner.withPropertyValues("spring.ai.model.embedding=none").run(context -> {
assertThat(context.getBeansOfType(TransformersEmbeddingModelProperties.class)).isEmpty();
assertThat(context.getBeansOfType(TransformersEmbeddingModel.class)).isEmpty();
});
this.contextRunner.withPropertyValues("spring.ai.embedding.transformer.enabled=true").run(context -> {
this.contextRunner.withPropertyValues("spring.ai.model.embedding=transformers").run(context -> {
assertThat(context.getBeansOfType(TransformersEmbeddingModelProperties.class)).isNotEmpty();
assertThat(context.getBeansOfType(TransformersEmbeddingModel.class)).isNotEmpty();
});