diff options
author | danielhanrahan <daniel.hanrahan@est.tech> | 2022-03-10 14:39:42 +0000 |
---|---|---|
committer | danielhanrahan <daniel.hanrahan@est.tech> | 2022-03-14 11:53:36 +0000 |
commit | 93b5533e44728faa87c291fbf44120ea013fab51 (patch) | |
tree | fa26abbb89f0c596c84371f3c144957b9591167c /gui-editors/gui-editor-apex/src/test | |
parent | 1e95c73cef25b524bc1f5791d4578332670202f7 (diff) |
Upgrade apex-pdp version in Apex Editor
Upgrade apex-pdp version to 2.7.1-SNAPSHOT
Fix NullPointerException in ModelHandler::setUuidAndDescription
Allow parsing models from policy_type_impl or apexPolicyModel
Remove deprecated Task input and output field functionality
Fix JS REST calls and tests after JAXB to Gson changes
Fix bugs in Task Edit form relating to task logic edit area
Issue-ID: POLICY-3990
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I4f506889df46619a0178ab99c99c73ec2fd5a1e3
Diffstat (limited to 'gui-editors/gui-editor-apex/src/test')
3 files changed, 0 insertions, 178 deletions
diff --git a/gui-editors/gui-editor-apex/src/test/java/org/onap/policy/gui/editors/apex/rest/handling/ApexEditorRestResourceTest.java b/gui-editors/gui-editor-apex/src/test/java/org/onap/policy/gui/editors/apex/rest/handling/ApexEditorRestResourceTest.java index e5f24ff..90a9b4d 100644 --- a/gui-editors/gui-editor-apex/src/test/java/org/onap/policy/gui/editors/apex/rest/handling/ApexEditorRestResourceTest.java +++ b/gui-editors/gui-editor-apex/src/test/java/org/onap/policy/gui/editors/apex/rest/handling/ApexEditorRestResourceTest.java @@ -781,76 +781,6 @@ class ApexEditorRestResourceTest { result = apexRequest(post(BASE_URL + "/Task/Create", sessionId) .content(entityString).contentType(APPLICATION_JSON)); assertEquals(ApexApiResult.Result.SUCCESS, result.getResult()); - - entityString = "{" + "\"name\" : \"HowsItGoing\"," + "\"version\" : \"0.0.2\"," - + "\"inputFields\" : {\"IField0\" : {\"name\" : \"StringType\", \"version\" : \"0.0.1\", " - + "\"localName\" : \"IField0\", \"optional\" : false}}," - + "\"uuid\" : \"1fa2e430-f2b2-11e6-bc64-92361f002799\"," - + "\"description\" : \"A description of hello\"" + "}"; - result = apexRequest(post(BASE_URL + "/Task/Create", sessionId) - .content(entityString).contentType(APPLICATION_JSON)); - assertEquals(ApexApiResult.Result.SUCCESS, result.getResult()); - - entityString = "{" + "\"name\" : \"Hi\"," + "\"version\" : \"0.0.2\"," - + "\"inputFields\" : {\"IField0\" : null}," - + "\"uuid\" : \"1fa2e430-f2b2-11e6-bc64-92361f002799\"," - + "\"description\" : \"A description of hello\"" + "}"; - result = apexRequest(post(BASE_URL + "/Task/Create", sessionId) - .content(entityString).contentType(APPLICATION_JSON)); - assertEquals(ApexApiResult.Result.FAILED, result.getResult()); - - entityString = "{" + "\"name\" : \"GoodDay\"," + "\"version\" : \"0.0.2\"," - + "\"inputFields\" : {\"IField0\" : {\"name\" : \"NonExistantType\", \"version\" : \"0.0.1\", " - + "\"localName\" : \"IField0\", \"optional\" : false}}," - + "\"uuid\" : \"1fa2e430-f2b2-11e6-bc64-92361f002799\"," - + "\"description\" : \"A description of hello\"" + "}"; - result = apexRequest(post(BASE_URL + "/Task/Create", sessionId) - .content(entityString).contentType(APPLICATION_JSON)); - assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult()); - - entityString = "{" + "\"name\" : \"Howdy\"," + "\"version\" : \"0.0.2\"," - + "\"inputFields\" : {\"IField0\" : {\"name\" : \"NonExistantType\", \"version\" : \"0.0.1\", " - + "\"localName\" : \"NotIField0\", \"optional\" : false}}," - + "\"uuid\" : \"1fa2e430-f2b2-11e6-bc64-92361f002799\"," - + "\"description\" : \"A description of hello\"" + "}"; - result = apexRequest(post(BASE_URL + "/Task/Create", sessionId) - .content(entityString).contentType(APPLICATION_JSON)); - assertEquals(ApexApiResult.Result.FAILED, result.getResult()); - - entityString = "{" + "\"name\" : \"HowsItGoing2\"," + "\"version\" : \"0.0.2\"," - + "\"outputFields\" : {\"OField0\" : {\"name\" : \"StringType\", \"version\" : \"0.0.1\", " - + "\"localName\" : \"OField0\", \"optional\" : false}}," - + "\"uuid\" : \"1fa2e430-f2b2-11e6-bc64-92361f002799\"," - + "\"description\" : \"A description of hello\"" + "}"; - result = apexRequest(post(BASE_URL + "/Task/Create", sessionId) - .content(entityString).contentType(APPLICATION_JSON)); - assertEquals(ApexApiResult.Result.SUCCESS, result.getResult()); - - entityString = "{" + "\"name\" : \"Hi2\"," + "\"version\" : \"0.0.2\"," - + "\"outputFields\" : {\"OField0\" : null}," - + "\"uuid\" : \"1fa2e430-f2b2-11e6-bc64-92361f002799\"," - + "\"description\" : \"A description of hello\"" + "}"; - result = apexRequest(post(BASE_URL + "/Task/Create", sessionId) - .content(entityString).contentType(APPLICATION_JSON)); - assertEquals(ApexApiResult.Result.FAILED, result.getResult()); - - entityString = "{" + "\"name\" : \"GoodDay2\"," + "\"version\" : \"0.0.2\"," - + "\"outputFields\" : {\"OField0\" : {\"name\" : \"NonExistantType\", \"version\" : \"0.0.1\"," - + " \"localName\" : \"OField0\", \"optional\" : false}}," - + "\"uuid\" : \"1fa2e430-f2b2-11e6-bc64-92361f002799\"," - + "\"description\" : \"A description of hello\"" + "}"; - result = apexRequest(post(BASE_URL + "/Task/Create", sessionId) - .content(entityString).contentType(APPLICATION_JSON)); - assertEquals(ApexApiResult.Result.CONCEPT_DOES_NOT_EXIST, result.getResult()); - - entityString = "{" + "\"name\" : \"Howdy2\"," + "\"version\" : \"0.0.2\"," - + "\"outputFields\" : {\"OField0\" : {\"name\" : \"NonExistantType\", \"version\" : \"0.0.1\", " - + "\"localName\" : \"NotOField0\", \"optional\" : false}}," - + "\"uuid\" : \"1fa2e430-f2b2-11e6-bc64-92361f002799\"," - + "\"description\" : \"A description of hello\"" + "}"; - result = apexRequest(post(BASE_URL + "/Task/Create", sessionId) - .content(entityString).contentType(APPLICATION_JSON)); - assertEquals(ApexApiResult.Result.FAILED, result.getResult()); } @Test diff --git a/gui-editors/gui-editor-apex/src/test/resources/models/PolicyModel.json b/gui-editors/gui-editor-apex/src/test/resources/models/PolicyModel.json index 9e3ea51..096e64a 100644 --- a/gui-editors/gui-editor-apex/src/test/resources/models/PolicyModel.json +++ b/gui-editors/gui-editor-apex/src/test/resources/models/PolicyModel.json @@ -439,74 +439,6 @@ "name": "task", "version": "0.0.1" }, - "inputFields": { - "entry": [ - { - "key": "IEPAR0", - "value": { - "key": "IEPAR0", - "fieldSchemaKey": { - "name": "eventContextItem0", - "version": "0.0.1" - } - } - }, - { - "key": "IEPAR1", - "value": { - "key": "IEPAR1", - "fieldSchemaKey": { - "name": "eventContextItem1", - "version": "0.0.1" - } - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "OE0PAR0", - "value": { - "key": "OE0PAR0", - "fieldSchemaKey": { - "name": "eventContextItem0", - "version": "0.0.1" - } - } - }, - { - "key": "OE0PAR1", - "value": { - "key": "OE0PAR1", - "fieldSchemaKey": { - "name": "eventContextItem1", - "version": "0.0.1" - } - } - }, - { - "key": "OE1PAR0", - "value": { - "key": "OE1PAR0", - "fieldSchemaKey": { - "name": "eventContextItem0", - "version": "0.0.1" - } - } - }, - { - "key": "OE1PAR1", - "value": { - "key": "OE1PAR1", - "fieldSchemaKey": { - "name": "eventContextItem1", - "version": "0.0.1" - } - } - } - ] - }, "taskParameters": { "entry": [ { diff --git a/gui-editors/gui-editor-apex/src/test/resources/models/PolicyModel.yaml b/gui-editors/gui-editor-apex/src/test/resources/models/PolicyModel.yaml index 201085c..54bb592 100644 --- a/gui-editors/gui-editor-apex/src/test/resources/models/PolicyModel.yaml +++ b/gui-editors/gui-editor-apex/src/test/resources/models/PolicyModel.yaml @@ -307,46 +307,6 @@ topology_template: key: name: task version: 0.0.1 - inputFields: - entry: - - key: IEPAR0 - value: - key: IEPAR0 - fieldSchemaKey: - name: eventContextItem0 - version: 0.0.1 - - key: IEPAR1 - value: - key: IEPAR1 - fieldSchemaKey: - name: eventContextItem1 - version: 0.0.1 - outputFields: - entry: - - key: OE0PAR0 - value: - key: OE0PAR0 - fieldSchemaKey: - name: eventContextItem0 - version: 0.0.1 - - key: OE0PAR1 - value: - key: OE0PAR1 - fieldSchemaKey: - name: eventContextItem1 - version: 0.0.1 - - key: OE1PAR0 - value: - key: OE1PAR0 - fieldSchemaKey: - name: eventContextItem0 - version: 0.0.1 - - key: OE1PAR1 - value: - key: OE1PAR1 - fieldSchemaKey: - name: eventContextItem1 - version: 0.0.1 taskParameters: entry: - key: taskParameter0 |