File tree Expand file tree Collapse file tree 3 files changed +25
-7
lines changed
sample-code/spring-app/src
main/java/com/sap/ai/sdk/app/controllers
test/java/com/sap/ai/sdk/app/controllers Expand file tree Collapse file tree 3 files changed +25
-7
lines changed Original file line number Diff line number Diff line change @@ -2,16 +2,24 @@ name: "End-to-end Tests"
22on :
33 workflow_dispatch :
44 schedule :
5- - cron : 0 2 * * *
5+ - cron : 15 2 * * MON-FRI
66
77env :
88 MVN_MULTI_THREADED_ARGS : --batch-mode --no-transfer-progress --fail-at-end --show-version --threads 1C
99 JAVA_VERSION : 17
1010
1111jobs :
12-
1312 end-to-end-tests :
14- # https://wiki.one.int.sap/wiki/display/DevFw/SUGAR
13+ strategy :
14+ fail-fast : false
15+ matrix :
16+ environment : [ canary, production ]
17+ exclude :
18+ - environment : production
19+ # secret-name: AI_CORE_PRODUCTION
20+ include :
21+ - environment : canary
22+ secret-name : AI_CORE_CANARY
1523 runs-on : ubuntu-latest
1624 steps :
1725
@@ -33,10 +41,10 @@ jobs:
3341 - name : " Run tests"
3442 run : |
3543 MVN_ARGS="${{ env.MVN_MULTI_THREADED_ARGS }} surefire:test -pl :spring-app -DskipTests=false"
36- mvn $MVN_ARGS
44+ mvn $MVN_ARGS "-Daicore.landscape=${{ matrix.environment }}"
3745 env :
3846 # See "End-to-end test application instructions" on the README.md to update the secret
39- AICORE_SERVICE_KEY : ${{ secrets.AICORE_SERVICE_KEY }}
47+ AICORE_SERVICE_KEY : ${{ secrets[matrix.secret-name] }}
4048
4149 - name : " Start Application Locally"
4250 run : |
5361 done
5462 env :
5563 # See "End-to-end test application instructions" on the README.md to update the secret
56- AICORE_SERVICE_KEY : ${{ secrets.AICORE_SERVICE_KEY }}
64+ AICORE_SERVICE_KEY : ${{ secrets[matrix.secret-name] }}
5765
5866 - name : " Health Check"
5967 # print response body with headers to stdout. q:body only O:print -:stdout S:headers
Original file line number Diff line number Diff line change 2525@ RequestMapping ("/orchestration" )
2626class OrchestrationController {
2727 private final OrchestrationClient client = new OrchestrationClient ();
28- OrchestrationModuleConfig config = new OrchestrationModuleConfig ().withLlmConfig (GPT_35_TURBO );
28+ OrchestrationModuleConfig config =
29+ new OrchestrationModuleConfig ()
30+ .withLlmConfig (GPT_35_TURBO .withParams (Map .of ("temperature" , 0.0 )));
2931
3032 /**
3133 * Chat request to OpenAI through the Orchestration service with a simple prompt.
Original file line number Diff line number Diff line change 1212import lombok .extern .slf4j .Slf4j ;
1313import org .junit .jupiter .api .BeforeEach ;
1414import org .junit .jupiter .api .Test ;
15+ import org .junit .jupiter .api .condition .DisabledIfSystemProperty ;
1516
1617@ Slf4j
1718class OrchestrationTest {
@@ -148,4 +149,11 @@ void testMaskingPseudonymization() {
148149 .doesNotContain ("MASKED_PERSON" )
149150 .contains ("Mallory" );
150151 }
152+
153+ @ Test
154+ @ DisabledIfSystemProperty (named = "aicore.landscape" , matches = "production" )
155+ void testGrounding () {
156+ // Placeholder for grounding test
157+ assertThat (System .getProperty ("aicore.landscape" )).isNotEqualTo ("production" );
158+ }
151159}
You can’t perform that action at this time.
0 commit comments