summaryrefslogtreecommitdiffstats
path: root/vid-automation/src
diff options
context:
space:
mode:
Diffstat (limited to 'vid-automation/src')
-rw-r--r--vid-automation/src/main/java/vid/automation/test/infra/Features.java1
-rw-r--r--vid-automation/src/main/java/vid/automation/test/test/BrowseASDCTest.java9
-rw-r--r--vid-automation/src/main/resources/registration_to_simulator/sanity/get_csar_zip_file.json10
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/SdcApiTest.java14
4 files changed, 17 insertions, 17 deletions
diff --git a/vid-automation/src/main/java/vid/automation/test/infra/Features.java b/vid-automation/src/main/java/vid/automation/test/infra/Features.java
index 9e55b9fbc..c1a505276 100644
--- a/vid-automation/src/main/java/vid/automation/test/infra/Features.java
+++ b/vid-automation/src/main/java/vid/automation/test/infra/Features.java
@@ -55,6 +55,7 @@ public enum Features implements Feature {
FLAG_1911_INSTANTIATION_ORDER_IN_ASYNC_ALACARTE,
FLAG_2002_ANY_ALACARTE_BESIDES_EXCLUDED_NEW_INSTANTIATION_UI,
FLAG_2002_VFM_UPGRADE_ADDITIONAL_OPTIONS,
+ FLAG_2002_IDENTIFY_INVARIANT_MACRO_UUID_BY_BACKEND,
;
public boolean isActive() {
diff --git a/vid-automation/src/main/java/vid/automation/test/test/BrowseASDCTest.java b/vid-automation/src/main/java/vid/automation/test/test/BrowseASDCTest.java
index 0671815bd..a9378e6df 100644
--- a/vid-automation/src/main/java/vid/automation/test/test/BrowseASDCTest.java
+++ b/vid-automation/src/main/java/vid/automation/test/test/BrowseASDCTest.java
@@ -5,6 +5,7 @@ import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
import static vid.automation.test.infra.Features.FLAG_1908_COLLECTION_RESOURCE_NEW_INSTANTIATION_UI;
import static vid.automation.test.infra.Features.FLAG_2002_ANY_ALACARTE_BESIDES_EXCLUDED_NEW_INSTANTIATION_UI;
+import static vid.automation.test.infra.Features.FLAG_2002_IDENTIFY_INVARIANT_MACRO_UUID_BY_BACKEND;
import static vid.automation.test.infra.Features.FLAG_5G_IN_NEW_INSTANTIATION_UI;
import static vid.automation.test.infra.Features.FLAG_NETWORK_TO_ASYNC_INSTANTIATION;
import static vid.automation.test.infra.Features.FLAG_SHOW_ORCHESTRATION_TYPE;
@@ -29,7 +30,7 @@ import org.onap.simulator.presetGenerator.presets.ecompportal_att.PresetGetSessi
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.testng.Assert;
-import org.testng.TimeBombSkipException;
+import org.testng.SkipException;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.DataProvider;
@@ -181,9 +182,9 @@ public class BrowseASDCTest extends CreateInstanceDialogBaseTest {
@Test
private void browseServiceModel_deployServiceMacroByMACRO_SERVICESConfig_creationPopupIsOldMacro() {
- if (FLAG_2002_ANY_ALACARTE_BESIDES_EXCLUDED_NEW_INSTANTIATION_UI.isActive() ) {
- throw new TimeBombSkipException("skipping identify macro by uuid for awhile", "2019/11/25");
- //also need to handle the simulator preset by using good ModelInfo instance
+ if (FLAG_2002_ANY_ALACARTE_BESIDES_EXCLUDED_NEW_INSTANTIATION_UI.isActive() &&
+ ! FLAG_2002_IDENTIFY_INVARIANT_MACRO_UUID_BY_BACKEND.isActive()) {
+ throw new SkipException("some 2002 flags shall come along together");
}
deployServiceAndAssertInstantiationType(
"csar15782222_invariantUUIDMacro.zip",
diff --git a/vid-automation/src/main/resources/registration_to_simulator/sanity/get_csar_zip_file.json b/vid-automation/src/main/resources/registration_to_simulator/sanity/get_csar_zip_file.json
deleted file mode 100644
index 7b39f77e6..000000000
--- a/vid-automation/src/main/resources/registration_to_simulator/sanity/get_csar_zip_file.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "simulatorRequest": {
- "method": "GET",
- "path": "/vidSimulator/getSomeFile"
-} ,
- "simulatorResponse": {
- "responseCode": 200,
- "file": "csar15782222_invariantUUIDMacro.zip"
- }
-} \ No newline at end of file
diff --git a/vid-automation/src/test/java/org/onap/vid/api/SdcApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/SdcApiTest.java
index 918c4131e..8549613f8 100644
--- a/vid-automation/src/test/java/org/onap/vid/api/SdcApiTest.java
+++ b/vid-automation/src/test/java/org/onap/vid/api/SdcApiTest.java
@@ -21,6 +21,7 @@
package org.onap.vid.api;
import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals;
+import static net.javacrumbs.jsonunit.JsonMatchers.jsonPartEquals;
import static net.javacrumbs.jsonunit.JsonMatchers.jsonStringEquals;
import static net.javacrumbs.jsonunit.core.Option.IGNORING_ARRAY_ORDER;
import static org.hamcrest.CoreMatchers.equalTo;
@@ -130,9 +131,16 @@ public class SdcApiTest extends BaseApiTest {
ResponseEntity<String> response = restTemplate.getForEntity(buildUri(SDC_GET_SERVICE_MODEL + MACRO_INSTANTIATION_TYPE_UUID), String.class);
assertEquals(response.getStatusCode(), HttpStatus.OK);
String emptyInstantiationTypeExpectedResponse = loadResourceAsString(EMPTY_INSTANTIATION_TYPE_EXPECTED_RESPONSE);
- assertThat(response.getBody(), jsonEquals(emptyInstantiationTypeExpectedResponse)
+
+ final String body = response.getBody();
+
+ assertThat(body, jsonEquals(emptyInstantiationTypeExpectedResponse)
.when(IGNORING_ARRAY_ORDER)
- .whenIgnoringPaths("service.vidNotions.instantiationUI"));
+ .whenIgnoringPaths("service.vidNotions.instantiationUI", "service.vidNotions.instantiationType"));
+
+ assertThat(body, jsonPartEquals("service.vidNotions.instantiationType",
+ Features.FLAG_2002_IDENTIFY_INVARIANT_MACRO_UUID_BY_BACKEND.isActive()
+ ? "ALaCarte" : "ClientConfig"));
}
@Test
@@ -154,7 +162,7 @@ public class SdcApiTest extends BaseApiTest {
String minMaxInitialExpectedResponse = loadResourceAsString("sdcApiTest/minMaxInitialExpectedResponse.json");
assertThat(response.getBody(), jsonEquals(minMaxInitialExpectedResponse)
.when(IGNORING_ARRAY_ORDER)
- .whenIgnoringPaths("service.vidNotions.instantiationUI"));
+ .whenIgnoringPaths("service.vidNotions.instantiationUI", "service.vidNotions.instantiationType"));
}
@Test