Skip to content

Commit ce7f0ca

Browse files
fix: [DevOps] Update outdated DeploymentTest (#750)
1 parent 0ee5ebe commit ce7f0ca

1 file changed

Lines changed: 26 additions & 2 deletions

File tree

sample-code/spring-app/src/test/java/com/sap/ai/sdk/app/controllers/DeploymentTest.java

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,37 @@
22

33
import static org.assertj.core.api.Assertions.assertThat;
44

5+
import com.sap.ai.sdk.core.client.ConfigurationApi;
6+
import com.sap.ai.sdk.core.model.AiConfigurationBaseData;
57
import com.sap.ai.sdk.core.model.AiDeployment;
68
import com.sap.ai.sdk.core.model.AiDeploymentStatus;
9+
import com.sap.ai.sdk.foundationmodels.openai.OpenAiModel;
710
import org.junit.jupiter.api.Test;
811

912
class DeploymentTest {
10-
/** Java end-to-end test specific configuration ID. "name":"config-java-e2e-test" */
11-
public static final String CONFIG_ID = "67e8d039-c7f1-4179-9f8f-60d158a36b0e";
13+
/** Java end-to-end test specific configuration ID. "name":"config-java-e2e-test-gpt-5" */
14+
public static final String CONFIG_ID = "9db691a2-a136-41c9-8fe1-1ffad5a63594";
15+
16+
/**
17+
* Manual execution to create a new config for a new model when the current model gets deprecated.
18+
*
19+
* <p>1) Run the below method with a non-deprecated model.
20+
*
21+
* <p>2) Copy the printed ID into CONFIG_ID above.
22+
*/
23+
// @Test
24+
void createConfiguration() {
25+
String modelToDeploy = OpenAiModel.GPT_5.name();
26+
var response =
27+
new ConfigurationApi()
28+
.create(
29+
"default",
30+
AiConfigurationBaseData.create()
31+
.name("config-java-e2e-test-" + modelToDeploy)
32+
.executableId("azure-openai")
33+
.scenarioId("foundation-models"));
34+
System.out.println("Created configuration with ID: " + response.getId());
35+
}
1236

1337
@Test
1438
void createDelete() {

0 commit comments

Comments
 (0)