Skip to content

Commit 7121a74

Browse files
committed
Fixes #3849 - Qualify tests
Signed-off-by: ddobrin <[email protected]>
1 parent ccacadd commit 7121a74

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

auto-configurations/models/spring-ai-autoconfigure-model-google-genai/src/test/java/org/springframework/ai/model/google/genai/autoconfigure/chat/GoogleGenAiModelConfigurationTests.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package org.springframework.ai.model.google.genai.autoconfigure.chat;
1818

1919
import org.junit.jupiter.api.Test;
20+
import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
2021

2122
import org.springframework.ai.google.genai.GoogleGenAiChatModel;
2223
import org.springframework.boot.autoconfigure.AutoConfigurations;
@@ -29,7 +30,7 @@
2930
*
3031
* @author Ilayaperumal Gopinathan
3132
*/
32-
public class GoogleGenAiModelConfigurationTests {
33+
class GoogleGenAiModelConfigurationTests {
3334

3435
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner();
3536

@@ -52,6 +53,8 @@ void chatModelActivationWithApiKey() {
5253
}
5354

5455
@Test
56+
@EnabledIfEnvironmentVariable(named = "GOOGLE_CLOUD_PROJECT", matches = ".*")
57+
@EnabledIfEnvironmentVariable(named = "GOOGLE_CLOUD_LOCATION", matches = ".*")
5558
void chatModelActivationWithVertexAi() {
5659

5760
this.contextRunner.withConfiguration(AutoConfigurations.of(GoogleGenAiChatAutoConfiguration.class))
@@ -83,4 +86,4 @@ void chatModelDefaultActivation() {
8386
});
8487
}
8588

86-
}
89+
}

0 commit comments

Comments
 (0)