aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN
diff options
context:
space:
mode:
authorsubhash kumar singh <subhash.kumar.singh@huawei.com>2019-01-16 18:13:48 +0530
committersubhash kumar singh <subhash.kumar.singh@huawei.com>2019-01-16 18:13:48 +0530
commita5d213aa479f5ae16b57563caf7801220baf5bec (patch)
tree35c680f11dfa09108ac370dc3c3c6ac0cd41142a /bpmn/MSOCommonBPMN
parent2e5bd7ed14d30437ccd662be63fe117c9702d75f (diff)
Fix url for catalog query
Fix url for catalog query. Change-Id: I694284b9c3b354a5d0e4340b7f7e78744096c80f Issue-ID: SO-1398 Signed-off-by: subhash kumar singh <subhash.kumar.singh@huawei.com>
Diffstat (limited to 'bpmn/MSOCommonBPMN')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java3
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilderTest.java16
2 files changed, 9 insertions, 10 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java
index 7259c56b6c..44559443a7 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java
@@ -66,8 +66,7 @@ public class ResourceRequestBuilder {
private static String CUSTOMIZATION_UUID = "cuserviceResourcesstomizationUUID";
- private static String SERVICE_URL_TOSCA_CSAR = "/v3/serviceToscaCsar";
- private static String SERVICE_URL_SERVICE_INSTANCE = "/v3/serviceResources";
+ private static String SERVICE_URL_SERVICE_INSTANCE = "/v2/serviceResources";
private static MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA, ResourceRequestBuilder.class);
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilderTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilderTest.java
index 731d890e15..115ed91e50 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilderTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilderTest.java
@@ -50,10 +50,10 @@ public class ResourceRequestBuilderTest {
UrnPropertiesReader reader = new UrnPropertiesReader();
Environment env = mock(Environment.class);
- when(env.getProperty(eq("mso.catalog.db.endpoint"))).thenReturn("http://localhost:8080");
+ when(env.getProperty(eq("mso.catalog.db.endpoint"))).thenReturn("http://localhost:8080/ecomp/mso/catalog");
reader.setEnvironment(env);
- WireMock.stubFor(WireMock.get(WireMock.urlEqualTo("/v3/serviceResources?serviceModelUuid=c3954379-4efe-431c-8258-f84905b158e5"))
+ WireMock.stubFor(WireMock.get(WireMock.urlEqualTo("/ecomp/mso/catalog/v2/serviceResources?serviceModelUuid=c3954379-4efe-431c-8258-f84905b158e5"))
.willReturn(WireMock.ok("{ \"serviceResources\" : {\n" +
"\t\"modelInfo\" : {\n" +
"\t\t\"modelName\" : \"demoVFWCL\",\n" +
@@ -148,10 +148,10 @@ public class ResourceRequestBuilderTest {
UrnPropertiesReader reader = new UrnPropertiesReader();
Environment env = mock(Environment.class);
- when(env.getProperty(eq("mso.catalog.db.endpoint"))).thenReturn("http://localhost:8080");
+ when(env.getProperty(eq("mso.catalog.db.endpoint"))).thenReturn("http://localhost:8080/ecomp/mso/catalog");
reader.setEnvironment(env);
- WireMock.stubFor(WireMock.get(WireMock.urlEqualTo("/v3/serviceResources?serviceModelUuid=c3954379-4efe-431c-8258-f84905b158e5"))
+ WireMock.stubFor(WireMock.get(WireMock.urlEqualTo("/ecomp/mso/catalog/v2/serviceResources?serviceModelUuid=c3954379-4efe-431c-8258-f84905b158e5"))
.willReturn(WireMock.ok("{ \"serviceResources\" : {\n" +
"\t\"modelInfo\" : {\n" +
"\t\t\"modelName\" : \"demoVFWCL\",\n" +
@@ -245,10 +245,10 @@ public class ResourceRequestBuilderTest {
UrnPropertiesReader reader = new UrnPropertiesReader();
Environment env = mock(Environment.class);
- when(env.getProperty(eq("mso.catalog.db.endpoint"))).thenReturn("http://localhost:8080");
+ when(env.getProperty(eq("mso.catalog.db.endpoint"))).thenReturn("http://localhost:8080/ecomp/mso/catalog");
reader.setEnvironment(env);
- WireMock.stubFor(WireMock.get(WireMock.urlEqualTo("/v3/serviceResources?serviceModelUuid=c3954379-4efe-431c-8258-f84905b158e5"))
+ WireMock.stubFor(WireMock.get(WireMock.urlEqualTo("/ecomp/mso/catalog/v2/serviceResources?serviceModelUuid=c3954379-4efe-431c-8258-f84905b158e5"))
.willReturn(WireMock.ok("{ \"serviceResources\" : {\n" +
"\t\"modelInfo\" : {\n" +
"\t\t\"modelName\" : \"demoVFWCL\",\n" +
@@ -342,10 +342,10 @@ public class ResourceRequestBuilderTest {
UrnPropertiesReader reader = new UrnPropertiesReader();
Environment env = mock(Environment.class);
- when(env.getProperty(eq("mso.catalog.db.endpoint"))).thenReturn("http://localhost:8080");
+ when(env.getProperty(eq("mso.catalog.db.endpoint"))).thenReturn("http://localhost:8080/ecomp/mso/catalog");
reader.setEnvironment(env);
- WireMock.stubFor(WireMock.get(WireMock.urlEqualTo("/v3/serviceResources?serviceModelUuid=c3954379-4efe-431c-8258-f84905b158e5"))
+ WireMock.stubFor(WireMock.get(WireMock.urlEqualTo("/ecomp/mso/catalog/v2/serviceResources?serviceModelUuid=c3954379-4efe-431c-8258-f84905b158e5"))
.willReturn(WireMock.ok("{ \"serviceResources\" : {\n" +
"\t\"modelInfo\" : {\n" +
"\t\t\"modelName\" : \"demoVFWCL\",\n" +