aboutsummaryrefslogtreecommitdiffstats
path: root/vid-automation/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'vid-automation/src/test')
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/ChangeManagementApiTest.java7
-rw-r--r--vid-automation/src/test/resources/changeManagement/responseNoTaskInfoBody.json146
2 files changed, 150 insertions, 3 deletions
diff --git a/vid-automation/src/test/java/org/onap/vid/api/ChangeManagementApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/ChangeManagementApiTest.java
index 6416244aa..108506e6d 100644
--- a/vid-automation/src/test/java/org/onap/vid/api/ChangeManagementApiTest.java
+++ b/vid-automation/src/test/java/org/onap/vid/api/ChangeManagementApiTest.java
@@ -1,5 +1,6 @@
package org.onap.vid.api;
+import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals;
import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.IsEqual.equalTo;
@@ -7,7 +8,6 @@ import static org.hamcrest.core.IsInstanceOf.instanceOf;
import static org.onap.vid.api.ChangeManagementUserApiLoggingTest.MSO_GET_CHANGE_MANAGEMENTS_SCALEOUT;
import static org.onap.vid.api.TestUtils.getNestedPropertyInMap;
import static org.testng.AssertJUnit.assertEquals;
-import static org.testng.AssertJUnit.assertFalse;
import static vid.automation.test.services.SimulatorApi.RegistrationStrategy.APPEND;
import com.google.common.collect.ImmutableList;
@@ -302,12 +302,13 @@ public class ChangeManagementApiTest extends BaseApiTest {
@Test
@FeatureTogglingTest(Features.FLAG_EXP_USE_FORMAT_PARAMETER_FOR_CM_DASHBOARD)
- public void getOrchestrationForDashboardShouldResponseWithFullBody() {
+ public void getOrchestrationForDashboardShouldResponseWithNoTaskInfoBody() {
SimulatorApi.registerExpectation(MSO_GET_CHANGE_MANAGEMENTS_SCALEOUT, RegistrationStrategy.CLEAR_THEN_SET);
SimulatorApi.registerExpectationFromPreset(new PresetMSOOrchestrationRequestsGetNoTaskInfoBody(), APPEND);
ResponseEntity<String> responseEntity = restTemplate.getForEntity(buildUri(CHANGE_MANAGEMENT + MSO ), String.class);
- assertFalse(responseEntity.getBody().contains("requestProcessingData"));
+ String expected = getResourceAsString("changeManagement/responseNoTaskInfoBody.json");
+ assertThat(responseEntity.getBody(), jsonEquals(expected));
}
diff --git a/vid-automation/src/test/resources/changeManagement/responseNoTaskInfoBody.json b/vid-automation/src/test/resources/changeManagement/responseNoTaskInfoBody.json
new file mode 100644
index 000000000..39737c7cf
--- /dev/null
+++ b/vid-automation/src/test/resources/changeManagement/responseNoTaskInfoBody.json
@@ -0,0 +1,146 @@
+[
+ {
+ "finishTime": "Mon, 05 Aug 2019 12:50:24 GMT",
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt19b",
+ "tenantId": "1c099363f335409ea47df3c8db61397a",
+ "cloudOwner": "irma-aic"
+ },
+ "modelInfo": {
+ "modelCustomizationName": "FEXN_5G_NC_VSP 0",
+ "modelCustomizationId": "2ba4f9f3-765f-4172-802e-a56a912c221c",
+ "modelInvariantId": "5fc21c6e-3ca3-4641-90f0-1e2ae66b20be",
+ "modelVersionId": "9ba01811-84ea-4878-9fd7-7a0a280e0572",
+ "modelName": "FEXN_5G_NC_VSP",
+ "modelType": "vnf",
+ "modelVersion": "2"
+ },
+ "requestInfo": {
+ "instanceName": "PST-VNF-1810-None-4751",
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "suppressRollback": false,
+ "requestorId": "yy3692"
+ },
+ "requestParameters": {
+ "testApi": "GR_API",
+ "userParams": [],
+ "aLaCarte": true
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "a06c0d0b-ae17-42fb-b9b5-4b3a93a7be11",
+ "modelInfo": {
+ "modelInvariantId": "abb333ce-c66a-4670-b44a-17fe6a4963f3",
+ "modelVersionId": "6c756dd3-ffa5-4162-b1a8-501e4a643707",
+ "modelName": "test_VNF_01_by5924",
+ "modelType": "service",
+ "modelVersion": "2"
+ }
+ }
+ }
+ ],
+ "lineOfBusiness": {
+ "lineOfBusinessName": "None_LOB - Collab"
+ },
+ "platform": {
+ "platformName": "None Platform - Collab"
+ }
+ },
+ "requestId": "f01fbb5d-c964-44d4-9080-00e83eae419f",
+ "requestScope": "vnf",
+ "requestStatus": {
+ "percentProgress": 100.0,
+ "requestState": "ROLLED_BACK",
+ "statusMessage": "STATUS: Error Source: SDNC, Error Message: Unable to find l3-network in AAI for network role sgi_direct_net_2 FLOW STATUS: All Rollback flows have completed successfully ROLLBACK STATUS: Rollback has been completed successfully.",
+ "timestamp": "Mon, 05 Aug 2019 12:50:24 GMT"
+ },
+ "requestType": "updateInstance",
+ "startTime": "Mon, 05 Aug 2019 12:49:35 GMT",
+ "instanceReferences": {
+ "serviceInstanceId": "a06c0d0b-ae17-42fb-b9b5-4b3a93a7be11",
+ "vnfInstanceId": "569cd880-e095-466a-b97d-97bb46fea257",
+ "vnfInstanceName": "PST-VNF-1810-None-4751",
+ "requestorId": "yy3692"
+ }
+ },
+ {
+ "finishTime": "Fri, 06 Mar 2020 23:08:40 GMT",
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "dyh2b",
+ "tenantId": "78491aac74be4fab9873db114774b475",
+ "cloudOwner": "irma-aic"
+ },
+ "modelInfo": {
+ "modelCustomizationName": "L3VPNvRR-RESOURCE 0",
+ "modelInvariantId": "fdb84cd2-87d8-4b22-bf47-b3ef765d2c11",
+ "modelName": "L3VPNvRR-RESOURCE",
+ "modelNameVersionId": "fdb84cd2-87d8-4b22-bf47-b3ef765d2c11",
+ "modelType": "vnf",
+ "modelVersion": "1"
+ },
+ "requestInfo": {
+ "source": "VID",
+ "suppressRollback": false,
+ "requestorId": "ROBOT"
+ },
+ "requestParameters": {
+ "testApi": "GR_API",
+ "userParams": []
+ }
+ },
+ "requestId": "64970886-ed75-4837-8bf1-0eb472fe65e6",
+ "requestScope": "vnf",
+ "requestStatus": {
+ "percentProgress": 100.0,
+ "requestState": "COMPLETE",
+ "statusMessage": "STATUS: ALaCarte-Vnf-deleteInstance request was executed correctly. FLOW STATUS: Successfully completed all Building Blocks",
+ "timestamp": "Fri, 06 Mar 2020 23:08:40 GMT"
+ },
+ "requestType": "replaceInstance",
+ "startTime": "Fri, 06 Mar 2020 23:07:48 GMT",
+ "instanceReferences": {
+ "serviceInstanceId": "e648ee86-c091-4d38-8573-99893cd79bfa",
+ "vnfInstanceId": "9a2b3dd1-5fd9-4cb4-a47f-b4f0e8e678e3",
+ "vnfInstanceName": "PST-VNF-2002-None-943501",
+ "requestorId": "ROBOT"
+ }
+ },
+ {
+ "requestId": "2a22aff4-620f-44b6-92a1-8a41be396d96\n\n",
+ "requestScope": "vfModule",
+ "requestStatus": {
+ "percentProgress": 100.0,
+ "requestState": "IN_PROGRESS",
+ "statusMessage": "Scale-Out Is In Progress",
+ "finishTime": "Fri, 08 Sep 2017 19:34:33 GMT"
+ },
+ "requestType": "scaleOut",
+ "startTime": "Fri, 08 Sep 2017 19:34:32 GMT",
+ "instanceReferences": {
+ "serviceInstanceId": "6dd0f8de-93c7-48a2-914b-1a8d58e0eb48",
+ "vnfInstanceId": "7c00cc1e-6425-4fc3-afc3-0289db288d4c",
+ "requestorId": "ds828e"
+ }
+ },
+ {
+ "requestId": "2d6502bf-c488-4903-817e-2ed2c644dcf4",
+ "requestScope": "vfModule",
+ "requestStatus": {
+ "percentProgress": 100.0,
+ "requestState": "COMPLETE",
+ "statusMessage": "Completed successfully",
+ "finishTime": "Thu, 09 Nov 2017 10:58:14 GMT"
+ },
+ "requestType": "scaleOut",
+ "startTime": "Thu, 09 Nov 2017 10:58:14 GMT",
+ "instanceReferences": {
+ "serviceInstanceId": "54ba3628-9ee5-4b32-8a2a-3abf001bed4e",
+ "vnfInstanceId": "b8d99523-1e83-4fd1-b42f-849361ef7024",
+ "requestorId": "az2016"
+ }
+ }
+] \ No newline at end of file