aboutsummaryrefslogtreecommitdiffstats
path: root/vid-automation/src/test/java
diff options
context:
space:
mode:
authorIttay Stern <ittay.stern@att.com>2019-11-26 19:02:29 +0200
committerIttay Stern <ittay.stern@att.com>2019-11-26 19:03:49 +0200
commit9e69d9bf8f44aff457ab95980747ad69aff62bfc (patch)
treeeeaca5126fabb99d536cd409071457b59ba1f1a4 /vid-automation/src/test/java
parent52f31f5641ed47a2c44956c91d88faf227b8a896 (diff)
Make ProbeApiTest expectation to follow tests' Simulator config
Issue-ID: VID-647 Change-Id: I56f9106403c31e545d00caaf2fe6d5df2f375843 Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-automation/src/test/java')
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/ProbeApiTest.java27
1 files changed, 17 insertions, 10 deletions
diff --git a/vid-automation/src/test/java/org/onap/vid/api/ProbeApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/ProbeApiTest.java
index 5ed302468..05075896a 100644
--- a/vid-automation/src/test/java/org/onap/vid/api/ProbeApiTest.java
+++ b/vid-automation/src/test/java/org/onap/vid/api/ProbeApiTest.java
@@ -1,6 +1,19 @@
package org.onap.vid.api;
+import static org.hamcrest.CoreMatchers.anyOf;
+import static org.hamcrest.CoreMatchers.both;
+import static org.hamcrest.CoreMatchers.endsWith;
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.startsWith;
+import static vid.automation.test.services.SimulatorApi.RegistrationStrategy.CLEAR_THEN_SET;
+import static vid.automation.test.services.SimulatorApi.getSimulatedResponsesPort;
+import static vid.automation.test.services.SimulatorApi.getSimulatorHost;
+
import com.google.common.collect.ImmutableList;
+import java.lang.reflect.Method;
+import java.util.Collection;
+import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
@@ -10,13 +23,13 @@ import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetSubscribersGet
import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetSubscribersGetInvalidResponse;
import org.onap.simulator.presetGenerator.presets.mso.PresetMSOOrchestrationRequestsManyStatusesGet;
import org.onap.simulator.presetGenerator.presets.mso.PresetMSOOrchestrationRequestsManyStatusesInvalidResponseGet;
+import org.onap.simulator.presetGenerator.presets.scheduler.PresetGetSchedulerChangeManagementInvalidResponse;
+import org.onap.simulator.presetGenerator.presets.scheduler.PresetGetSchedulerChangeManagements;
import org.onap.simulator.presetGenerator.presets.sdc.PresetSDCGetServiceToscaModelGet;
import org.onap.simulator.presetGenerator.presets.sdc.PresetSDCGetServiceToscaModelGetEmptyResult;
import org.onap.simulator.presetGenerator.presets.sdc.PresetSDCGetServiceToscaModelGetInvalidResponse;
import org.onap.vid.model.probe.ExternalComponentStatus;
import org.onap.vid.model.probe.HttpRequestMetadata;
-import org.onap.simulator.presetGenerator.presets.scheduler.PresetGetSchedulerChangeManagementInvalidResponse;
-import org.onap.simulator.presetGenerator.presets.scheduler.PresetGetSchedulerChangeManagements;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
@@ -25,19 +38,13 @@ import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import vid.automation.test.services.SimulatorApi;
-import java.lang.reflect.Method;
-import java.util.Collection;
-import java.util.List;
-
-import static org.hamcrest.CoreMatchers.*;
-import static vid.automation.test.services.SimulatorApi.RegistrationStrategy.CLEAR_THEN_SET;
-
public class ProbeApiTest extends BaseApiTest {
private static final String MSO_QUERY_PARAMS = "filter=requestExecutionDate:EQUALS:01-01-2100";
private static final String AAI_QUERY_PARMAS = "business/customers?subscriber-type=INFRA&depth=0";
private static final String SDC_PATH_PARAMS = "46401eec-35bd-4e96-ad0d-0356ff6b8c8d/toscaModel";
- private static final String SCHEDULER_PATH = "http://localhost:1080/scheduler/v1/ChangeManagement/schedules/scheduleDetails/";
+ private static final String SCHEDULER_PATH =
+ String.format("http://%s:%d/scheduler/v1/ChangeManagement/schedules/scheduleDetails/", getSimulatorHost(), getSimulatedResponsesPort());
@BeforeClass