-
Notifications
You must be signed in to change notification settings - Fork 41
Adding a warning for legacy route usage #1785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -353,6 +353,7 @@ public class Messages { | |
| // Progress messages | ||
| public static final String OPERATION_ID = "Operation ID: {0}"; | ||
| public static final String MTA_SCHEMA_VERSION_DETECTED_AS = "Detected MTA schema version: \"{0}\""; | ||
| public static final String LEGACY_ROUTE_DEPLOY_SERVICE_DEPRECATED = "You are using legacy route https://deploy-service.cfapps.<domain> of SAP Cloud Deployment service. It will be deprecated and removed in the end of 2026. To avoid issues in the future, update all workflows to use the proper SAP Cloud Deployment route https://deploy-service.cf.<domain> (replace \"cfapps\" with \"cf\"). More information: https://me.sap.com/notes/3695458"; | ||
|
||
| public static final String DEPLOYING_IN_ORG_0_AND_SPACE_1 = "Deploying in org \"{0}\" and space \"{1}\""; | ||
| public static final String NO_DEPLOYED_MTA_DETECTED = "No deployed MTA detected - this is initial deployment of MTA with ID \"{0}\""; | ||
| public static final String NO_DEPLOYED_MTA_DETECTED_WITH_NAMESPACE = "No deployed MTA detected - this is initial deployment of MTA with ID \"{0}\" and namespace \"{1}\""; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -196,7 +196,10 @@ void testStartOperation() { | |
| Operation operation = createOperation(null, null, parameters); | ||
| Mockito.when(operationsHelper.getProcessDefinitionKey(operation)) | ||
| .thenReturn("deploy"); | ||
| operationsApiService.startOperation(SPACE_GUID, operation); | ||
| HttpServletRequest httpServletRequestMock = Mockito.mock(HttpServletRequest.class); | ||
| Mockito.when(httpServletRequestMock.getRequestURL()) | ||
| .thenReturn(new StringBuffer("test/api/path")); | ||
| operationsApiService.startOperation(SPACE_GUID, operation, httpServletRequestMock); | ||
| Mockito.verify(flowableFacade) | ||
| .startProcess(Mockito.any(), Mockito.anyMap()); | ||
| } | ||
|
|
@@ -210,12 +213,15 @@ void testStartOperationWithInvalidParametersForTheProcess() { | |
| Mockito.when(operationsHelper.getProcessDefinitionKey(operation)) | ||
| .thenReturn("deploy"); | ||
|
|
||
| operationsApiService.startOperation(SPACE_GUID, operation); | ||
| HttpServletRequest httpServletRequestMock = Mockito.mock(HttpServletRequest.class); | ||
| Mockito.when(httpServletRequestMock.getRequestURL()) | ||
| .thenReturn(new StringBuffer("test/api/path")); | ||
| operationsApiService.startOperation(SPACE_GUID, operation, httpServletRequestMock); | ||
|
|
||
| Mockito.verify(flowableFacade) | ||
| .startProcess(ArgumentMatchers.eq("deploy"), ArgumentMatchers.argThat( | ||
| map -> map.containsKey(Variables.MTA_ID.getName()) && map.containsKey(Variables.EXT_DESCRIPTOR_FILE_ID.getName()) | ||
| && !map.containsKey(Variables.CTS_PROCESS_ID.getName()) && !map.containsKey(Variables.DEPLOY_URI.getName()))); | ||
| && !map.containsKey(Variables.CTS_PROCESS_ID.getName()) && !map.containsKey(Variables.CTS_PASSWORD.getName()))); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why DEPLOY_URI was removed and replaced with CTS_PASSWORD variable?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. discussed :) |
||
| } | ||
|
|
||
| @Test | ||
|
|
@@ -225,8 +231,10 @@ void testStartOperationWithValidParametersForTheProcess() { | |
| Operation operation = createOperation(null, null, parameters); | ||
| Mockito.when(operationsHelper.getProcessDefinitionKey(operation)) | ||
| .thenReturn("deploy"); | ||
|
|
||
| operationsApiService.startOperation(SPACE_GUID, operation); | ||
| HttpServletRequest httpServletRequestMock = Mockito.mock(HttpServletRequest.class); | ||
| Mockito.when(httpServletRequestMock.getRequestURL()) | ||
| .thenReturn(new StringBuffer("test/api/path")); | ||
| operationsApiService.startOperation(SPACE_GUID, operation, httpServletRequestMock); | ||
|
|
||
| Mockito.verify(flowableFacade) | ||
| .startProcess(ArgumentMatchers.eq("deploy"), ArgumentMatchers.argThat( | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest to changeto: ".cfapps."