summaryrefslogtreecommitdiffstats
path: root/vid-automation/src/test
diff options
context:
space:
mode:
authorEylon Malin <eylon.malin@intl.att.com>2019-11-21 12:01:58 +0200
committerEylon Malin <eylon.malin@intl.att.com>2019-11-25 15:30:52 +0200
commitcbe6877e50b69370170bea4057bb8d5baf42946e (patch)
treed68c31c9ecd55a371944fe08e5c45025c9dca9ef /vid-automation/src/test
parentc1777f478aa421c35667a99fd2199569bc9e4a8a (diff)
identify macro services without instantiation type in BE by feature flag
Issue-ID: VID-705 Change-Id: Ia618f91133cdecbd35eac4346496a6ff38a3753e Signed-off-by: Eylon Malin <eylon.malin@intl.att.com>
Diffstat (limited to 'vid-automation/src/test')
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/SdcApiTest.java14
1 files changed, 11 insertions, 3 deletions
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