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 /bpmn/MSOCoreBPMN/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 'bpmn/MSOCoreBPMN/src/test/java')
-rw-r--r-- | bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/json/JsonUtilsTest.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/json/JsonUtilsTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/json/JsonUtilsTest.java index 6748128f05..067ae9806d 100644 --- a/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/json/JsonUtilsTest.java +++ b/bpmn/MSOCoreBPMN/src/test/java/org/onap/so/bpmn/core/json/JsonUtilsTest.java @@ -81,7 +81,19 @@ public class JsonUtilsTest { JSONArray assignmentInfo = homingDataJson.getJSONArray("assignmentInfo"); Map<String, String> map = utils.entryArrayToMap(assignmentInfo.toString(), "variableName", "variableValue"); assertEquals(map.get("cloudOwner"), "CloudOwner"); - } + } + @Test + public void entryArrayToMapStringTestOof() throws IOException { + JsonUtils utils = new JsonUtils(); + String response = this.getJson("OofExample.json"); + String entry = JsonUtils.getJsonValue(response, "solutions.placementSolutions"); + JSONArray arr = new JSONArray(entry); + JSONArray arr2 = arr.getJSONArray(0); + JSONObject homingDataJson = arr2.getJSONObject(0); + JSONArray assignmentInfo = homingDataJson.getJSONArray("assignmentInfo"); + Map<String, String> map = utils.entryArrayToMap(assignmentInfo.toString(), "key", "value"); + assertEquals(map.get("cloudOwner"), "HPA-cloud"); + } @Test public void getJsonRootPropertyTest() throws IOException { String response = this.getJson("SDNCServiceResponseExample.json"); |