summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2019-01-17 13:28:28 +0000
committerGerrit Code Review <gerrit@onap.org>2019-01-17 13:28:28 +0000
commit1ffcaf5fd23760e01b9ed3ae9367c42a07ba55f7 (patch)
tree606221d4f2cae5cc0d204bb2ad368c3b5a042b10
parentae993816c1dbe800dffe0c9e0dada126a57860e6 (diff)
parenta5d213aa479f5ae16b57563caf7801220baf5bec (diff)
Merge "Fix url for catalog query" into casablanca
-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" +