diff options
Diffstat (limited to 'ui-ci/src')
8 files changed, 81 insertions, 63 deletions
diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/AdminUserManagment.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/AdminUserManagment.java index 710188af43..b1cd09c6d8 100644 --- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/AdminUserManagment.java +++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/AdminUserManagment.java @@ -58,8 +58,17 @@ public class AdminUserManagment extends SetupCDTest { @DataProvider(name = "searchValues") private final Object[][] searchString(){ User newUser = createNewUserUsingAPI(); + GeneralUIUtils.getDriver().navigate().refresh(); return new Object[][]{{newUser.getUserId(), newUser}, {newUser.getFirstName(), newUser}, {newUser.getLastName(), newUser}, {newUser.getEmail(), newUser}}; } + + //TC915101 + @Test(dataProvider = "searchValues") + public void searchUserByCriterionsTest(String searchCriterion, User user) throws IOException{ + setLog(searchCriterion); + AdminWorkspaceUIUtilies.searchForUser(searchCriterion); + UserManagementVerificator.validateFirstRowDisplayedCorrectly(user); + } //TC915100 @Test @@ -137,13 +146,7 @@ public class AdminUserManagment extends SetupCDTest { Assert.assertEquals(inputErrors.size() - 1 , inputErrorsSize, "Did not find an error : " + expectedErrorMsg); } - //TC915101 - @Test(dataProvider = "searchValues") - public void searchUserByCriterionsTest(String searchCriterion, User user) throws IOException{ - setLog(searchCriterion); - AdminWorkspaceUIUtilies.searchForUser(searchCriterion); - UserManagementVerificator.validateFirstRowDisplayedCorrectly(user); - } + //TC915101 @Test @@ -253,7 +256,7 @@ public class AdminUserManagment extends SetupCDTest { private User createNewUserUsingAPI() { UserRoleEnum role = UserRoleEnum.DESIGNER; String userId = generateValidUserId(); - User userByEnv = new User("Tzemer", "Gefen", userId, "userId@intl.sdc.com", role.name(), null); + User userByEnv = new User(generateValidUserId(), generateValidUserId(), userId, generateValidUserId()+"@intl.sdc.com", role.name(), null); User adminUser = getUserByEnv(UserRoleEnum.ADMIN); try { RestResponse createUserResp = UserRestUtils.createUser(userByEnv, adminUser); diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Onboard.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Onboard.java index 05cef22706..fddb97ace3 100644 --- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Onboard.java +++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Onboard.java @@ -28,16 +28,12 @@ import java.io.File; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; -import java.util.LinkedList; import java.util.List; import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; import java.util.stream.Collectors; import org.openecomp.sdc.ci.tests.datatypes.CanvasElement; import org.openecomp.sdc.ci.tests.datatypes.CanvasManager; -import org.openecomp.sdc.ci.tests.datatypes.HeatMetaFirstLevelDefinition; import org.openecomp.sdc.ci.tests.datatypes.ServiceReqDetails; import org.openecomp.sdc.ci.tests.datatypes.enums.UserRoleEnum; import org.openecomp.sdc.ci.tests.execute.setup.ArtifactsCorrelationManager; @@ -65,9 +61,8 @@ import org.testng.annotations.Optional; import org.testng.annotations.Parameters; import org.testng.annotations.Test; -import com.clearspring.analytics.util.Pair; import com.aventstack.extentreports.Status; -import com.aventstack.extentreports.ExtentTest; +import com.clearspring.analytics.util.Pair; public class Onboard extends SetupCDTest { @@ -113,9 +108,9 @@ public class Onboard extends SetupCDTest { @Test public void onboardVNFTestSanity() throws Exception, Throwable { -// String filepath = getFilePath(); -// String vnfFile = "2016-043_vsaegw_fdnt_30_1607_e2e.zip"; String filepath = getFilePath(); +// String vnfFile = "2016-012_vMX_AV_30_1072_e2e.zip"; +// String filepath = getFilePath(); Object[] fileNamesFromFolder = FileHandling.getZipFileNamesFromFolder(filepath); String vnfFile = fileNamesFromFolder[0].toString(); runOnboardToDistributionFlow(filepath, vnfFile); @@ -159,6 +154,9 @@ public class Onboard extends SetupCDTest { GeneralUIUtils.findComponentAndClick(serviceMetadata.getName()); GovernorOperationPage.approveSerivce(serviceMetadata.getName()); + if (makeDistributionValue.equals("true")){ + + reloginWithNewRole(UserRoleEnum.OPS); GeneralUIUtils.findComponentAndClick(serviceMetadata.getName()); OpsOperationPage.distributeService(); @@ -171,6 +169,8 @@ public class Onboard extends SetupCDTest { // validateInputArtsVSouput(serviceMetadata.getName()); + } + getExtendTest().log(Status.INFO, String.format("The onboarding %s test is passed ! ", vnfFile)); } @@ -255,7 +255,7 @@ public class Onboard extends SetupCDTest { GeneralUIUtils.findComponentAndClick(serviceMetadata.getName()); GovernorOperationPage.approveSerivce(serviceMetadata.getName()); - if (!makeDistributionValue.equals("true")){ + reloginWithNewRole(UserRoleEnum.OPS); GeneralUIUtils.findComponentAndClick(serviceMetadata.getName()); @@ -266,7 +266,7 @@ public class Onboard extends SetupCDTest { AssertJUnit.assertEquals(1, rowsFromMonitorTable.size()); OpsOperationPage.waitUntilArtifactsDistributed(0); - } + getExtendTest().log(Status.INFO, String.format("onboarding %s test is passed ! ", vnfFile)); diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Service.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Service.java index 63e6e086d6..d5920a22ca 100644 --- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Service.java +++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/Service.java @@ -293,12 +293,7 @@ public class Service extends SetupCDTest { } @Test - public void ManagmentWorkflowTest() throws Exception{ - - if(true){ - throw new SkipException("Open bug 287416"); - } - + public void ManagmentWorkflowTest() throws Exception{ String descriptionText = DESCRIPTION, descriptionTextEdit = "kuku2"; @@ -578,12 +573,7 @@ public class Service extends SetupCDTest { } @Test - public void deploymentViewServiceTest() throws Exception{ - - if(true){ - throw new SkipException("Open bug 295220, 295180"); - } - + public void deploymentViewServiceTest() throws Exception{ String fileName2 = "vSeGW.csar"; ResourceReqDetails resourceMetaData = ElementFactory.getDefaultResourceByType("ciRes", NormativeTypesEnum.ROOT, ResourceCategoryEnum.APPLICATION_L4_DATABASE, getUser().getUserId(), ResourceTypeEnum.VF.toString()); @@ -607,7 +597,7 @@ public class Service extends SetupCDTest { String instanceModuleText = instanceModule.getText(); ResourceUIUtils.clickOnElementByText(instanceModuleText, "instance"); - ServiceVerificator.verifyDeploymentPageSubElements(instanceModuleText.split("\\.\\.")[1], new DeploymentViewVerificator(filePath + fileName2)); + ServiceVerificator.verifyDeploymentPageSubElements(instanceModuleText.split("\\.\\.")[2], new DeploymentViewVerificator(filePath + fileName2)); ServiceVerificator.verifyDisabledServiceProperties(); String isBaseValue = ServiceVerificator.getVFModulePropertieValue(serviceMetadata, "isBase", instanceModuleText); diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/VfDeploymentInformationalArtifacts.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/VfDeploymentInformationalArtifacts.java index 0fc9ef59b7..22396ec9c7 100644 --- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/VfDeploymentInformationalArtifacts.java +++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/sanity/VfDeploymentInformationalArtifacts.java @@ -65,7 +65,7 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { deploymentArtifacts.add(new ArtifactInfo(null, "heatartifactname1.yaml", null, "heatartifactname1", ArtifactTypeEnum.HEAT.getType(), "1")); deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder, deploymentArtifacts, null); } @@ -86,7 +86,7 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { deploymentArtifacts.add(new ArtifactInfo(null, "HeatVolArtifactName3.yaml", null, "HeatVolArtifactName3", ArtifactTypeEnum.HEAT_VOL.getType(), "1")); deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName,folder, deploymentArtifacts, null); } @@ -105,7 +105,7 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); List<ArtifactInfo> informationalArtifacts = new ArrayList<ArtifactInfo>(); informationalArtifacts.add(new ArtifactInfo(null, "artifactname1.xml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1")); @@ -127,7 +127,7 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); List<ArtifactInfo> informationalArtifacts = new ArrayList<ArtifactInfo>(); informationalArtifacts.add(new ArtifactInfo(null, "artifactname1.xml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1")); @@ -156,7 +156,7 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { deploymentArtifacts.add(new ArtifactInfo(null, "HeatVolArtifactName2.yaml", null, "HeatVolArtifactName2", ArtifactTypeEnum.HEAT_VOL.getType(), "1")); deploymentArtifacts.add(new ArtifactInfo(null, "HeatVolArtifactName3.yaml", null, "HeatVolArtifactName3", ArtifactTypeEnum.HEAT_VOL.getType(), "1")); deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); List<ArtifactInfo> informationalArtifacts = new ArrayList<ArtifactInfo>(); informationalArtifacts.add(new ArtifactInfo(null, "artifactname1.xml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1")); @@ -183,7 +183,7 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); deploymentArtifacts.add(new ArtifactInfo(null, "ArtifactName.yaml", null, "ArtifactName", ArtifactTypeEnum.OTHER.getType(), "1")); deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder, deploymentArtifacts, null); } @@ -202,7 +202,7 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); List<ArtifactInfo> informationalArtifacts = new ArrayList<ArtifactInfo>(); informationalArtifacts.add(new ArtifactInfo(null, "ArtifactName.yaml", null, "ArtifactName", ArtifactTypeEnum.OTHER.getType(), "1")); @@ -266,8 +266,8 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); - deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "4")); importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder, deploymentArtifacts, null); @@ -289,8 +289,8 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); - deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "4")); ArtifactInfo artifactInfo = new ArtifactInfo(null, "artifactname1.yaml", null, "artifactname1", ArtifactTypeEnum.HEAT.getType(), "1"); deploymentArtifacts.add(artifactInfo); @@ -316,8 +316,8 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); - deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "4")); ArtifactInfo artifactInfo = new ArtifactInfo(null, "artifactname1.yaml", null, "artifactname1", ArtifactTypeEnum.HEAT.getType(), "1"); deploymentArtifacts.add(artifactInfo); @@ -346,7 +346,7 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder, deploymentArtifacts, null); @@ -374,7 +374,7 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); List<ArtifactInfo> informationalArtifacts = new ArrayList<ArtifactInfo>(); ArtifactInfo artifactInfo = new ArtifactInfo(null, "artifactname1.xml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1"); @@ -408,7 +408,7 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); List<ArtifactInfo> informationalArtifacts = new ArrayList<ArtifactInfo>(); ArtifactInfo artifactInfo = new ArtifactInfo(null, "artifactname1.xml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1"); @@ -438,7 +438,7 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); deploymentArtifacts.add(new ArtifactInfo(null, "heatartifactname1.yaml", null, "heatartifactname1", ArtifactTypeEnum.HEAT.getType(), "1")); deploymentArtifacts.add(new ArtifactInfo(null, "heatartifactname2.yaml", null, "heatartifactname2", ArtifactTypeEnum.HEAT.getType(), "1")); deploymentArtifacts.add(new ArtifactInfo(null, "HeatVolArtifactName1.yaml", null, "HeatVolArtifactName1", ArtifactTypeEnum.HEAT_VOL.getType(), "1")); @@ -541,7 +541,7 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); deploymentArtifacts.add(new ArtifactInfo(null, "artifactname1.yaml", null, "artifactname1", ArtifactTypeEnum.HEAT.getType(), "1")); importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder, deploymentArtifacts, null); @@ -572,7 +572,7 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); List<ArtifactInfo> informationalArtifacts = new ArrayList<ArtifactInfo>(); informationalArtifacts.add(new ArtifactInfo(null, "artifactname1.xml", null, "artifactname1", ArtifactTypeEnum.OTHER.getType(), "1")); @@ -601,7 +601,7 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); deploymentArtifacts.add(new ArtifactInfo(null, "artifactname1.yaml", null, "artifactname1", ArtifactTypeEnum.HEAT.getType(), "1")); importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder, deploymentArtifacts, null); @@ -680,7 +680,7 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder, deploymentArtifacts, null); @@ -725,7 +725,7 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); importVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(fileName, folder, deploymentArtifacts, null); } @@ -741,8 +741,8 @@ public class VfDeploymentInformationalArtifacts extends SetupCDTest { String updatedCsarFileName = "UpdateTC1444533.csar"; List<ArtifactInfo> deploymentArtifacts = new ArrayList<ArtifactInfo>(); - deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); - deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "1")); + deploymentArtifacts.add(new ArtifactInfo(null, "base_ldsa.yaml", null, "base_ldsa", ArtifactTypeEnum.HEAT.getType(), "2")); + deploymentArtifacts.add(new ArtifactInfo(null, "module_1_ldsa.yaml", null, "module_1_ldsa", ArtifactTypeEnum.HEAT.getType(), "4")); updateVfAndValidateInformationalDeploymentArtifactPagesOnPagesAndComposition(folder, updatedCsarFileName, deploymentArtifacts, null, null, null); } diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/OnboardingUtils.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/OnboardingUtils.java index dfb4b74fac..95fbefa040 100644 --- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/OnboardingUtils.java +++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/utilities/OnboardingUtils.java @@ -35,6 +35,7 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.UUID; +import java.util.stream.Collectors; import org.apache.commons.io.IOUtils; import org.apache.http.HttpEntity; @@ -766,19 +767,37 @@ public class OnboardingUtils { LinkedList<HeatMetaFirstLevelDefinition> deploymentArtifacts = ((LinkedList<HeatMetaFirstLevelDefinition>) combinedMap.get("Deployment")); ArtifactsCorrelationManager.addVNFartifactDetails(vspName, deploymentArtifacts); + List<String> heatEnvFilesFromCSAR = deploymentArtifacts.stream().filter(e -> e.getType().equals("HEAT_ENV")). + map(e -> e.getFileName()). + collect(Collectors.toList()); + + validateDeploymentArtifactsVersion(deploymentArtifacts, heatEnvFilesFromCSAR); + + DeploymentArtifactPage.verifyArtifactsExistInTable(filepath, vnfFile); + return createVendorSoftwareProduct; + } + + public static void validateDeploymentArtifactsVersion(LinkedList<HeatMetaFirstLevelDefinition> deploymentArtifacts, + List<String> heatEnvFilesFromCSAR) { + String artifactVersion; + String artifactName; + for(HeatMetaFirstLevelDefinition deploymentArtifact: deploymentArtifacts) { + artifactVersion = "1"; + if(deploymentArtifact.getType().equals("HEAT_ENV")) { continue; } else if(deploymentArtifact.getFileName().contains(".")) { - ArtifactUIUtils.validateArtifactNameVersionType(deploymentArtifact.getFileName().trim().substring(0, deploymentArtifact.getFileName().lastIndexOf(".")), "1", deploymentArtifact.getType()); + artifactName = deploymentArtifact.getFileName().trim().substring(0, deploymentArtifact.getFileName().lastIndexOf(".")); } else { - ArtifactUIUtils.validateArtifactNameVersionType(deploymentArtifact.getFileName().trim(), "1", deploymentArtifact.getType()); + artifactName = deploymentArtifact.getFileName().trim(); } + if (heatEnvFilesFromCSAR.contains(artifactName + ".env")){ + artifactVersion = "2"; + } + ArtifactUIUtils.validateArtifactNameVersionType(artifactName, artifactVersion, deploymentArtifact.getType()); } - - DeploymentArtifactPage.verifyArtifactsExistInTable(filepath, vnfFile); - return createVendorSoftwareProduct; } } diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/verificator/ServiceVerificator.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/verificator/ServiceVerificator.java index 2c1f59fe9f..2c133e6246 100644 --- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/verificator/ServiceVerificator.java +++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/verificator/ServiceVerificator.java @@ -60,6 +60,7 @@ import org.openecomp.sdc.ci.tests.utils.general.AtomicOperationUtils; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.ui.Select; +import org.testng.SkipException; import com.aventstack.extentreports.Status; @@ -269,6 +270,11 @@ public class ServiceVerificator { } else if (propertyName.equals("max_vf_module_instances")) { actualNumber = baseNumber + 1; } else if (propertyName.equals("min_vf_module_instances")){ + + if(true){ + throw new SkipException("Open bug 305331"); + } + actualNumber = baseNumber - 1; } diff --git a/ui-ci/src/main/resources/ci/scripts/addUsersFromList_new.sh b/ui-ci/src/main/resources/ci/scripts/addUsersFromList_new.sh index 48560792ae..1b6f0258d6 100644 --- a/ui-ci/src/main/resources/ci/scripts/addUsersFromList_new.sh +++ b/ui-ci/src/main/resources/ci/scripts/addUsersFromList_new.sh @@ -46,12 +46,12 @@ function addUser () firstName=`echo $user|awk '{print $3}'` lastName=`echo $user|awk '{print $4}'` email=`echo $user|awk '{print $5}'` - curl -i -X post -d '{ "userId" : "'${userId}'", "role" : "'${role}'", "firstName" : "'${firstName}'", "lastName" : "'${lastName}'", "email" : "'${email}'" }' -H "Content-Type: application/json" -H "USER_ID: jh0003" http://${IP}:8080/sdc2/rest/v1/user + curl --noproxy '*' -i -X post -d '{ "userId" : "'${userId}'", "role" : "'${role}'", "firstName" : "'${firstName}'", "lastName" : "'${lastName}'", "email" : "'${email}'" }' -H "Content-Type: application/json" -H "USER_ID: jh0003" http://${IP}:8080/sdc2/rest/v1/user else echo "Host" $IP "Is Unreachable" fi done -curl -i -X post -d '{"consumerName": "ci","consumerSalt": "2a1f887d607d4515d4066fe0f5452a50","consumerPassword": "0a0dc557c3bf594b1a48030e3e99227580168b21f44e285c69740b8d5b13e33b"}' -H "Content-Type: application/json" -H "USER_ID: jh0003" -H "Authorization:Basic Y2k6MTIzNDU2" http://${IP}:8080/sdc2/rest/v1/consumers +curl --noproxy '*' -i -X post -d '{"consumerName": "ci","consumerSalt": "2a1f887d607d4515d4066fe0f5452a50","consumerPassword": "0a0dc557c3bf594b1a48030e3e99227580168b21f44e285c69740b8d5b13e33b"}' -H "Content-Type: application/json" -H "USER_ID: jh0003" -H "Authorization:Basic Y2k6MTIzNDU2" http://${IP}:8080/sdc2/rest/v1/consumers } diff --git a/ui-ci/src/main/resources/ci/scripts/userList.txt b/ui-ci/src/main/resources/ci/scripts/userList.txt index 92d140842c..1a2026f291 100644 --- a/ui-ci/src/main/resources/ci/scripts/userList.txt +++ b/ui-ci/src/main/resources/ci/scripts/userList.txt @@ -1 +1 @@ -export USER_LIST=( "m99121 DESIGNER" "cs0008 DESIGNER Carlos Santana" "kb0004 TESTER" "af0006 OPS" "ah0002 GOVERNOR" "m08740 DESIGNER" "m99124 TESTER" "m08743 TESTER" "m99123 OPS" "m08742 OPS" "m99125 GOVERNOR" "m08744 GOVERNOR" "m99122 ADMIN" "m08741 ADMIN" "m99126 PRODUCT_STRATEGIST" "m08745 PRODUCT_STRATEGIST" "m99127 PRODUCT_MANAGER" "m08746 PRODUCT_MANAGER" "md9897 DESIGNER" "m08748 DESIGNER" "m08749 TESTER" "be0695 DESIGNER" "er434w DESIGNER" "ya107f DESIGNER" "ds200p DESIGNER" "ak0333 ADMIN" "th0695 DESIGNER" "al714h DESIGNER" "ys9693 DESIGNER" "ss8214 DESIGNER" "bt750h DESIGNER" "rp955r DESIGNER" "ez6451 DESIGNER" "ia901h DESIGNER" "ah7840 DESIGNER" "ea394r DESIGNER" "ms656r DESIGNER" "ml636r DESIGNER" "it1721 DESIGNER" "sg473v DESIGNER" "sa997j DESIGNER" "az2497 DESIGNER" "ys189e DESIGNER" "ig642y DESIGNER" ) +export USER_LIST=( "m99121 DESIGNER Carlos Santana carlos@email.com" "cs0008 DESIGNER Carlos Santana carlos@email.com" "kb0004 TESTER Carlos Santana carlos@email.com" "af0006 OPS Carlos Santana carlos@email.com" "ah0002 GOVERNOR Carlos Santana carlos@email.com" "m08740 DESIGNER Carlos Santana carlos@email.com" "m99124 TESTER Carlos Santana carlos@email.com" "m08743 TESTER Carlos Santana carlos@email.com" "m99123 OPS Carlos Santana carlos@email.com" "m08742 OPS" "m99125 GOVERNOR Carlos Santana carlos@email.com" "m08744 GOVERNOR Carlos Santana carlos@email.com" "m99122 ADMIN Carlos Santana carlos@email.com" "m08741 ADMIN Carlos Santana carlos@email.com" "m99126 PRODUCT_STRATEGIST Carlos Santana carlos@email.com" "m08745 PRODUCT_STRATEGISTCarlos Santana carlos@email.com" "m99127 PRODUCT_MANAGER Carlos Santana carlos@email.com" "m08746 PRODUCT_MANAGER Carlos Santana carlos@email.com" "md9897 DESIGNER Carlos Santana carlos@email.com" "m08748 DESIGNER Carlos Santana carlos@email.com" "m08749 TESTER Carlos Santana carlos@email.com" "be0695 DESIGNER Carlos Santana carlos@email.com" "er434w DESIGNER Carlos Santana carlos@email.com" "ya107f DESIGNER Carlos Santana carlos@email.com" "ds200p DESIGNER Carlos Santana carlos@email.com" "ak0333 ADMIN Carlos Santana carlos@email.com" "th0695 DESIGNER Carlos Santana carlos@email.com" "al714h DESIGNER Carlos Santana carlos@email.com" "ys9693 DESIGNER Carlos Santana carlos@email.com" "ss8214 DESIGNER Carlos Santana carlos@email.com" "bt750h DESIGNER Carlos Santana carlos@email.com" "rp955r DESIGNER Carlos Santana carlos@email.com" "ez6451 DESIGNER Carlos Santana carlos@email.com" "ia901h DESIGNER Carlos Santana carlos@email.com" "ah7840 DESIGNER Carlos Santana carlos@email.com" "ea394r DESIGNER Carlos Santana carlos@email.com" "ms656r DESIGNER Carlos Santana carlos@email.com" "ml636r DESIGNER Carlos Santana carlos@email.com" "it1721 DESIGNER Carlos Santana carlos@email.com" "sg473v DESIGNER Carlos Santana carlos@email.com" "sa997j DESIGNER Carlos Santana carlos@email.com" "az2497 DESIGNER Carlos Santana carlos@email.com" "ys189e DESIGNER Carlos Santana carlos@email.com" "ig642y DESIGNER Carlos Santana carlos@email.com")
\ No newline at end of file |