diff options
author | Ittay Stern <ittay.stern@att.com> | 2019-11-25 14:04:02 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-11-25 14:04:02 +0000 |
commit | 88e5a40c125893a5600bdd81ef943b921e9f8f08 (patch) | |
tree | 6a43657acd3769a82e05ccefdea273d29d2bda91 /vid-automation/src/test | |
parent | 36cd35eebe45d15deb3a1d0ba272e4fb0548061b (diff) | |
parent | cbe6877e50b69370170bea4057bb8d5baf42946e (diff) |
Merge "identify macro services without instantiation type in BE by feature flag"
Diffstat (limited to 'vid-automation/src/test')
-rw-r--r-- | vid-automation/src/test/java/org/onap/vid/api/SdcApiTest.java | 14 |
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 |