diff options
Diffstat (limited to 'catalog-fe')
-rw-r--r-- | catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/FeProxyServlet.java | 2 | ||||
-rw-r--r-- | catalog-fe/src/test/java/org/openecomp/sdc/servlets/FeProxyServletTest.java | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/FeProxyServlet.java b/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/FeProxyServlet.java index 78d9fe7893..a79397b8b2 100644 --- a/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/FeProxyServlet.java +++ b/catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/FeProxyServlet.java @@ -181,7 +181,6 @@ public class FeProxyServlet extends SSLProxyServlet { } } else if (uri.contains(WORKFLOW_CONTEXT)){ - uri = uri.replace(SDC1_FE_PROXY +WORKFLOW_CONTEXT,WORKFLOW_CONTEXT); String workflowPluginURL = getPluginConfiguration(request).getPluginsList() .stream() .filter(plugin -> plugin.getPluginId().equalsIgnoreCase(PLUGIN_ID_WORKFLOW)) @@ -192,6 +191,7 @@ public class FeProxyServlet extends SSLProxyServlet { protocol = workflowURL.getProtocol(); host = workflowURL.getHost(); port = String.valueOf(workflowURL.getPort()); + uri = uri.replace(SDC1_FE_PROXY + WORKFLOW_CONTEXT, workflowURL.getPath() + WORKFLOW_CONTEXT); } else{ uri = uri.replace(SDC1_FE_PROXY,"/sdc2"); diff --git a/catalog-fe/src/test/java/org/openecomp/sdc/servlets/FeProxyServletTest.java b/catalog-fe/src/test/java/org/openecomp/sdc/servlets/FeProxyServletTest.java index be782cd336..4915936b1d 100644 --- a/catalog-fe/src/test/java/org/openecomp/sdc/servlets/FeProxyServletTest.java +++ b/catalog-fe/src/test/java/org/openecomp/sdc/servlets/FeProxyServletTest.java @@ -112,7 +112,7 @@ public class FeProxyServletTest { List<PluginsConfiguration.Plugin> pluginList = new ArrayList<PluginsConfiguration.Plugin>(); when(plugin.getPluginId()).thenReturn("WORKFLOW"); when(plugin.getPluginSourceUrl()).thenReturn(WF_PROTOCOL + "://" + WF_HOST + ":" + WF_PORT); - when(plugin.getPluginDiscoveryUrl()).thenReturn(WF_PROTOCOL + "://" + WF_HOST + ":" + WF_PORT); + when(plugin.getPluginDiscoveryUrl()).thenReturn(WF_PROTOCOL + "://" + WF_HOST + ":" + WF_PORT + "/workflows"); pluginList.add(plugin); when(configurationManager.getPluginsConfiguration()).thenReturn(pluginsConfiguration); when(pluginsConfiguration.getPluginsList()).thenReturn(pluginList); @@ -184,7 +184,7 @@ public class FeProxyServletTest { public void testRewriteURIWithWFAPIRequest() { when(servletRequest.getRequestURI()).thenReturn("/sdc1/feProxy/wf/workflows"); String requestResourceUrl = "http://localhost:8080/sdc1/feProxy/wf/workflows"; - String expectedChangedUrl = WF_PROTOCOL + "://" + WF_HOST + ":" + WF_PORT + "/wf/workflows"; + String expectedChangedUrl = WF_PROTOCOL + "://" + WF_HOST + ":" + WF_PORT + "/workflows/wf/workflows"; when(servletRequest.getRequestURL()).thenReturn(new StringBuffer(requestResourceUrl)); when(servletRequest.getContextPath()).thenReturn("/sdc1"); |