summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/roles/RoleValidator.java2
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/roles/RoleValidatorBySubscriberAndServiceType.java (renamed from vid-app-common/src/main/java/org/onap/vid/roles/RoleValidatorByRoles.java)4
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/controller/AaiControllerTest.java6
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/roles/RoleValidatorBySubscriberAndServiceTypeTest.java (renamed from vid-app-common/src/test/java/org/onap/vid/roles/RoleValidatorByRolesTest.java)29
-rw-r--r--vid-webpack-master/cypress/pipeline/group1.txt2
-rw-r--r--vid-webpack-master/cypress/pipeline/group2.txt19
-rw-r--r--vid-webpack-master/cypress/pipeline/run_group2.sh13
7 files changed, 24 insertions, 51 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/roles/RoleValidator.java b/vid-app-common/src/main/java/org/onap/vid/roles/RoleValidator.java
index 830c0f50c..f0ee26b0b 100644
--- a/vid-app-common/src/main/java/org/onap/vid/roles/RoleValidator.java
+++ b/vid-app-common/src/main/java/org/onap/vid/roles/RoleValidator.java
@@ -35,7 +35,7 @@ public interface RoleValidator {
static RoleValidator by(List<Role> roles, boolean disableRoles) {
return disableRoles
? new AlwaysValidRoleValidator()
- : new RoleValidatorByRoles(roles);
+ : new RoleValidatorBySubscriberAndServiceType(roles);
}
boolean isSubscriberPermitted(String subscriberName);
diff --git a/vid-app-common/src/main/java/org/onap/vid/roles/RoleValidatorByRoles.java b/vid-app-common/src/main/java/org/onap/vid/roles/RoleValidatorBySubscriberAndServiceType.java
index ad5b519c4..244610c89 100644
--- a/vid-app-common/src/main/java/org/onap/vid/roles/RoleValidatorByRoles.java
+++ b/vid-app-common/src/main/java/org/onap/vid/roles/RoleValidatorBySubscriberAndServiceType.java
@@ -24,11 +24,11 @@ import java.util.List;
import java.util.Map;
import org.onap.vid.mso.rest.RequestDetails;
-public class RoleValidatorByRoles implements RoleValidator {
+public class RoleValidatorBySubscriberAndServiceType implements RoleValidator {
private final List<Role> userRoles;
- RoleValidatorByRoles(List<Role> roles) {
+ RoleValidatorBySubscriberAndServiceType(List<Role> roles) {
this.userRoles = roles;
}
diff --git a/vid-app-common/src/test/java/org/onap/vid/controller/AaiControllerTest.java b/vid-app-common/src/test/java/org/onap/vid/controller/AaiControllerTest.java
index 521102383..400926fbd 100644
--- a/vid-app-common/src/test/java/org/onap/vid/controller/AaiControllerTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/controller/AaiControllerTest.java
@@ -69,7 +69,7 @@ import org.onap.vid.aai.util.AAIRestInterface;
import org.onap.vid.model.VersionByInvariantIdsRequest;
import org.onap.vid.properties.Features;
import org.onap.vid.roles.RoleProvider;
-import org.onap.vid.roles.RoleValidatorByRoles;
+import org.onap.vid.roles.RoleValidatorBySubscriberAndServiceType;
import org.onap.vid.services.AaiService;
import org.onap.vid.utils.SystemPropertiesWrapper;
import org.onap.vid.utils.Unchecked;
@@ -408,7 +408,7 @@ public class AaiControllerTest {
String okResponseBody = "OK_RESPONSE";
AaiResponse<String> aaiResponse = new AaiResponse<>(okResponseBody, "", HttpStatus.OK.value());
given(featureManager.isActive(Features.FLAG_1906_AAI_SUB_DETAILS_REDUCE_DEPTH)).willReturn(isFeatureActive);
- given(aaiService.getSubscriberData(eq(subscriberId), isA(RoleValidatorByRoles.class),
+ given(aaiService.getSubscriberData(eq(subscriberId), isA(RoleValidatorBySubscriberAndServiceType.class),
eq(isFeatureActive && omitServiceInstances)))
.willReturn(aaiResponse);
@@ -479,7 +479,7 @@ public class AaiControllerTest {
String okResponseBody = "OK_RESPONSE";
AaiResponse<String> aaiResponse = new AaiResponse<>(okResponseBody, "", HttpStatus.OK.value());
given(featureManager.isActive(Features.FLAG_1906_AAI_SUB_DETAILS_REDUCE_DEPTH)).willReturn(isFeatureActive);
- given(aaiService.getSubscriberData(eq(subscriberId), isA(RoleValidatorByRoles.class),
+ given(aaiService.getSubscriberData(eq(subscriberId), isA(RoleValidatorBySubscriberAndServiceType.class),
eq(isFeatureActive && omitServiceInstances)))
.willReturn(aaiResponse);
diff --git a/vid-app-common/src/test/java/org/onap/vid/roles/RoleValidatorByRolesTest.java b/vid-app-common/src/test/java/org/onap/vid/roles/RoleValidatorBySubscriberAndServiceTypeTest.java
index 9362ec9d7..77e5088e5 100644
--- a/vid-app-common/src/test/java/org/onap/vid/roles/RoleValidatorByRolesTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/roles/RoleValidatorBySubscriberAndServiceTypeTest.java
@@ -31,7 +31,7 @@ import org.onap.vid.mso.rest.RequestDetails;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
-public class RoleValidatorByRolesTest {
+public class RoleValidatorBySubscriberAndServiceTypeTest {
private static final String SAMPLE_SUBSCRIBER = "sampleSubscriber";
private static final String NOT_MATCHING_SUBSCRIBER = "notMatchingSubscriber";
@@ -46,61 +46,64 @@ public class RoleValidatorByRolesTest {
private Map<String, Object> requestParameters = ImmutableMap.of("subscriptionServiceType", SAMPLE_SERVICE_TYPE);
private Map<String, Object> requestDetailsProperties = ImmutableMap.of("subscriberInfo", subscriberInfo, "requestParameters", requestParameters);
private RequestDetails requestDetails;
- private RoleValidatorByRoles roleValidator;
+ private RoleValidatorBySubscriberAndServiceType roleValidatorBySubscriberAndServiceType;
@BeforeMethod
public void setUp() {
- roleValidator = new RoleValidatorByRoles(roles);
+ roleValidatorBySubscriberAndServiceType = new RoleValidatorBySubscriberAndServiceType(roles);
requestDetails = new RequestDetails();
}
@Test
public void shouldPermitSubscriberWhenNameMatchesAndRolesAreEnabled() {
- assertThat(roleValidator.isSubscriberPermitted(SAMPLE_SUBSCRIBER)).isTrue();
+ assertThat(roleValidatorBySubscriberAndServiceType.isSubscriberPermitted(SAMPLE_SUBSCRIBER)).isTrue();
}
@Test
public void shouldNotPermitSubscriberWhenNameNotMatches() {
- assertThat(roleValidator.isSubscriberPermitted(NOT_MATCHING_SUBSCRIBER)).isFalse();
+ assertThat(roleValidatorBySubscriberAndServiceType.isSubscriberPermitted(NOT_MATCHING_SUBSCRIBER)).isFalse();
}
@Test
public void shouldPermitServiceWhenNamesMatches() {
- assertThat(roleValidator.isServicePermitted(SAMPLE_SUBSCRIBER, SAMPLE_SERVICE_TYPE)).isTrue();
+ assertThat(roleValidatorBySubscriberAndServiceType.isServicePermitted(SAMPLE_SUBSCRIBER, SAMPLE_SERVICE_TYPE)).isTrue();
}
@Test
public void shouldNotPermitServiceWhenSubscriberNameNotMatches() {
- assertThat(roleValidator.isServicePermitted(NOT_MATCHING_SUBSCRIBER, SAMPLE_SERVICE_TYPE)).isFalse();
+ assertThat(
+ roleValidatorBySubscriberAndServiceType.isServicePermitted(NOT_MATCHING_SUBSCRIBER, SAMPLE_SERVICE_TYPE)).isFalse();
}
@Test
public void shouldNotPermitServiceWhenServiceTypeNotMatches() {
- assertThat(roleValidator.isServicePermitted(SAMPLE_SUBSCRIBER, NOT_MATCHING_SUBSCRIBER)).isFalse();
+ assertThat(roleValidatorBySubscriberAndServiceType.isServicePermitted(SAMPLE_SUBSCRIBER, NOT_MATCHING_SUBSCRIBER)).isFalse();
}
@Test
public void shouldPermitTenantWhenNameMatches() {
- assertThat(roleValidator.isTenantPermitted(SAMPLE_SUBSCRIBER, SAMPLE_SERVICE_TYPE, SAMPLE_TENANT)).isTrue();
+ assertThat(roleValidatorBySubscriberAndServiceType
+ .isTenantPermitted(SAMPLE_SUBSCRIBER, SAMPLE_SERVICE_TYPE, SAMPLE_TENANT)).isTrue();
}
@Test
public void shouldNotPermitTenantWhenNameNotMatches() {
- assertThat(roleValidator.isTenantPermitted(SAMPLE_SUBSCRIBER, SAMPLE_SERVICE_TYPE, NOT_MATCHING_TENANT)).isFalse();
+ assertThat(roleValidatorBySubscriberAndServiceType
+ .isTenantPermitted(SAMPLE_SUBSCRIBER, SAMPLE_SERVICE_TYPE, NOT_MATCHING_TENANT)).isFalse();
}
@Test
public void shouldValidateProperlySORequest() {
requestDetails.setAdditionalProperty("requestDetails", requestDetailsProperties);
- assertThat(roleValidator.isMsoRequestValid(requestDetails)).isTrue();
+ assertThat(roleValidatorBySubscriberAndServiceType.isMsoRequestValid(requestDetails)).isTrue();
}
@Test
public void shouldValidateUnknownSORequest() {
- assertThat(roleValidator.isMsoRequestValid(new RequestDetails())).isTrue();
+ assertThat(roleValidatorBySubscriberAndServiceType.isMsoRequestValid(new RequestDetails())).isTrue();
}
@Test
@@ -109,6 +112,6 @@ public class RoleValidatorByRolesTest {
Map<String, Object> requestDetailsProperties = ImmutableMap.of("subscriberInfo", subscriberInfo, "requestParameters", requestParameters);
requestDetails.setAdditionalProperty("requestDetails", requestDetailsProperties);
- assertThat(roleValidator.isMsoRequestValid(requestDetails)).isFalse();
+ assertThat(roleValidatorBySubscriberAndServiceType.isMsoRequestValid(requestDetails)).isFalse();
}
}
diff --git a/vid-webpack-master/cypress/pipeline/group1.txt b/vid-webpack-master/cypress/pipeline/group1.txt
index 0b3425060..a9b5aef46 100644
--- a/vid-webpack-master/cypress/pipeline/group1.txt
+++ b/vid-webpack-master/cypress/pipeline/group1.txt
@@ -6,3 +6,5 @@ cypress/integration/iFrames/collectionResource.e2e.ts
cypress/integration/iFrames/commitDialog.e2e.ts
cypress/integration/iFrames/drawingBoard.e2e.ts
cypress/integration/iFrames/instantiation-templates.e2e.ts
+cypress/integration/iFrames/instantiation.templates.modal.e2e.ts
+cypress/integration/iFrames/instantiationStatus.e2e.ts
diff --git a/vid-webpack-master/cypress/pipeline/group2.txt b/vid-webpack-master/cypress/pipeline/group2.txt
deleted file mode 100644
index 7d808dd8a..000000000
--- a/vid-webpack-master/cypress/pipeline/group2.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-cypress/integration/iFrames/network.popup.e2e.ts
-cypress/integration/iFrames/permission.e2e.ts
-cypress/integration/iFrames/pnf.e2e.ts
-cypress/integration/iFrames/retry.e2e.ts
-cypress/integration/iFrames/searchExistingInstance.e2e.ts
-cypress/integration/iFrames/service.popup.e2e.ts
-cypress/integration/iFrames/serviceWithNetwork.e2e.ts
-cypress/integration/iFrames/serviceWithVnfNetwork.e2e.ts
-cypress/integration/iFrames/softDeleteAndResume.e2e.ts
-cypress/integration/iFrames/tenantIsolation.e2e.ts
-cypress/integration/iFrames/viewEdit.e2e.ts
-cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts
-cypress/integration/iFrames/viewOnlyDrawingBoard.e2e.ts
-cypress/integration/iFrames/vnf.popup.e2e.ts
-cypress/integration/iFrames/vnfGroups.e2e.ts
-cypress/integration/iFrames/vrf.e2e.ts
-cypress/integration/iFrames/welcomePage.e2e.ts
-cypress/integration/shared/error.message.popup.e2e.ts
-cypress/integration/shared/spinner.e2e.ts
diff --git a/vid-webpack-master/cypress/pipeline/run_group2.sh b/vid-webpack-master/cypress/pipeline/run_group2.sh
deleted file mode 100644
index edee7efac..000000000
--- a/vid-webpack-master/cypress/pipeline/run_group2.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-. $HOME/.nvm/nvm.sh
-
-set -x
-
-CYPRESS_HOME_DIR=$1
-TESTS_GROUP_FILE=cypress/pipeline/group2.txt
-
-cd ${CYPRESS_HOME_DIR}
-
-cat ${TESTS_GROUP_FILE}
-npm run cypress:headless --max-old-space-size=4096 -- --spec=$(cat ${TESTS_GROUP_FILE} | tr '\n' ',')