diff options
author | Alexey Sandler <alexey.sandler@intl.att.com> | 2020-03-15 15:55:10 +0200 |
---|---|---|
committer | Amichai Hemli <amichai.hemli@intl.att.com> | 2020-03-16 10:47:26 +0200 |
commit | 212533a0274fd52384c02b929d435e4fb6aeed82 (patch) | |
tree | b26f545f4408b86d3ff9f9130d45b621d64903c1 /vid-automation/src/test/java/org/onap | |
parent | 6357b9b66cd937f50a11c223cb63e818ecb9ef08 (diff) |
API test to verify simpleNoTaskInfo format
Issue-ID: VID-787
Signed-off-by: Alexey Sandler <alexey.sandler@intl.att.com>
Change-Id: I650530f9490d45d3fc3fe3fcb1b853bdded7d07a
Signed-off-by: Alexey Sandler <alexey.sandler@intl.att.com>
Diffstat (limited to 'vid-automation/src/test/java/org/onap')
-rw-r--r-- | vid-automation/src/test/java/org/onap/vid/api/ChangeManagementApiTest.java | 20 |
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 { |