diff options
author | Marcus G K Williams <marcus.williams@intel.com> | 2018-11-09 15:56:17 -0800 |
---|---|---|
committer | Marcus G K Williams <marcus.williams@intel.com> | 2018-11-12 18:26:57 -0800 |
commit | 0f76551ead270d92d9933eab58d088e49b1e766c (patch) | |
tree | 159816c59ce619f6ced5a36bc67c530c60bc6d42 /adapters/mso-catalog-db-adapter/src/test/java | |
parent | a21c5617e3b278a1bd179708b0345381632cef2b (diff) |
Fix OOF Directives processing
- Various fixes to process OOF directives
correctly
- Add orchestrator userParam Processing to ala carte
and vCPE path to ensure multicloud adapter can be
called when homing
- Fix JsonUtils to accept json object as well as
strings
- Adds JsonUtils unit tests to ensure json object
code works correctly and didn't break previous func.
- Fix OOF Homing codes processing of OOF response to
match Casablanca response from OOF (including OOF
directives)
- Add CloudIdentity get and put to catalogDBClient,
along with junit tests - to enable creation of cloudSites
- Fix serviceResourceId check
Issue-ID: SO-1203
Change-Id: Ice9a9d1da2ce0cd4bd11029e3669b30d658fe359
Signed-off-by: Marcus G K Williams <marcus.williams@intel.com>
Diffstat (limited to 'adapters/mso-catalog-db-adapter/src/test/java')
2 files changed, 6 insertions, 3 deletions
diff --git a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/CloudConfigTest.java b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/CloudConfigTest.java index 0606848b04..eb2d3753d9 100644 --- a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/CloudConfigTest.java +++ b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/CloudConfigTest.java @@ -63,14 +63,14 @@ public class CloudConfigTest { headers.set("Content-Type",MediaType.APPLICATION_JSON); CloudSite cloudSite = new CloudSite(); - cloudSite.setId("MTN6"); + cloudSite.setId("MTN7"); cloudSite.setClli("TESTCLLI"); cloudSite.setRegionId("regionId"); cloudSite.setCloudVersion("VERSION"); cloudSite.setPlatform("PLATFORM"); CloudIdentity cloudIdentity = new CloudIdentity(); - cloudIdentity.setId("RANDOMID"); + cloudIdentity.setId("RANDOMID-test"); cloudIdentity.setIdentityUrl("URL"); cloudIdentity.setMsoId("MSO_ID"); cloudIdentity.setMsoPass("MSO_PASS"); @@ -81,7 +81,7 @@ public class CloudConfigTest { cloudSite.setIdentityService(cloudIdentity); String uri = "/cloudSite"; UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl("http://localhost:"+ port + uri); - HttpEntity<CloudSite> request = new HttpEntity<CloudSite>(cloudSite, headers); + HttpEntity<CloudSite> request = new HttpEntity<CloudSite>(cloudSite, headers); ResponseEntity<String> response = restTemplate.exchange(builder.toUriString(), HttpMethod.POST, request, String.class); assertEquals(Response.Status.CREATED.getStatusCode(), response.getStatusCode().value()); @@ -96,4 +96,6 @@ public class CloudConfigTest { } + + } diff --git a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java index 5e2bd82776..c85a4c28f5 100644 --- a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java +++ b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java @@ -413,6 +413,7 @@ public class CatalogDbClientTest { Assert.assertEquals("regionId", getCloudSite.getRegionId()); Assert.assertEquals("RANDOMID", getCloudSite.getIdentityServiceId()); } + @Test public void testGetServiceByModelName() { Service service = client.getServiceByModelName("MSOTADevInfra_Test_Service"); |