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.java20
1 files changed, 20 insertions, 0 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 6625d2a41..6416244aa 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
@@ -4,8 +4,11 @@ import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.IsEqual.equalTo;
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;
import com.google.common.collect.ImmutableMap;
@@ -36,6 +39,7 @@ import org.onap.simulator.presetGenerator.presets.aaf.AAFGetBasicAuthPreset;
import org.onap.simulator.presetGenerator.presets.aaf.AAFGetUrlServicePreset;
import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetCloudOwnersByCloudRegionId;
import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetSubscribersGet;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOOrchestrationRequestsGetNoTaskInfoBody;
import org.onap.simulator.presetGenerator.presets.mso.changeManagement.PresetMsoChangeManagementBase;
import org.onap.simulator.presetGenerator.presets.mso.changeManagement.PresetMsoVnfInPlaceSoftwareUpdate;
import org.onap.simulator.presetGenerator.presets.mso.changeManagement.PresetMsoVnfReplace;
@@ -59,12 +63,15 @@ import org.onap.vid.model.workflow.VnfWorkflowRelationResponse;
import org.onap.vid.model.workflow.WorkflowsDetail;
import org.onap.vid.more.LoggerFormatTest;
import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
import org.springframework.util.StopWatch;
import org.springframework.web.client.RestTemplate;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
+import vid.automation.test.infra.FeatureTogglingTest;
+import vid.automation.test.infra.Features;
import vid.automation.test.services.SimulatorApi;
import vid.automation.test.services.SimulatorApi.RegistrationStrategy;
import vid.automation.test.utils.InsecureHttpsClient;
@@ -85,6 +92,7 @@ public class ChangeManagementApiTest extends BaseApiTest {
public static final String GET_VNF_WORKFLOW_RELATION = "get_vnf_workflow_relation";
public static final String VNF_WORKFLOW_RELATION = "vnf_workflow_relation";
public static final String SCHEDULER_BY_SCHEDULE_ID = "/scheduler/schedules/{scheduleId}";
+ public static final String MSO = "/mso";
@DataProvider
public static Object[][] requestWithoutServiceInstanceId(Method test) {
@@ -291,6 +299,18 @@ public class ChangeManagementApiTest extends BaseApiTest {
System.out.print(stopWatch.prettyPrint());
}
+
+ @Test
+ @FeatureTogglingTest(Features.FLAG_EXP_USE_FORMAT_PARAMETER_FOR_CM_DASHBOARD)
+ public void getOrchestrationForDashboardShouldResponseWithFullBody() {
+ 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"));
+
+ }
+
// CONFIG_UPDATE
@Test
public void testConfigUpdateHappyPath() throws IOException {