From c5c60bfb5889bfe63e310448d863192dd60078c5 Mon Sep 17 00:00:00 2001 From: sebdet Date: Tue, 25 Aug 2020 12:31:39 +0200 Subject: [PATCH] Add sdc startup in IT Remove main method and move test suites for backend in a specific folder Issue-ID: SDC-3232 Signed-off-by: sebdet Change-Id: Ic38534f5b5105c56fb5fe3124431c8146f9200d0 --- integration-tests/pom.xml | 69 +++++++++++++- .../ci/tests/execute/devCI/ArtifactFromCsar.java | 11 --- .../ci/tests/utils/rest/EcompUserRestUtils.java | 29 ------ .../src/test/resources/ci/conf/attsdc.yaml | 2 +- .../ci/testSuites/{ => backend}/CRUDArtifacts.xml | 0 .../testSuites/{ => backend}/ExternalApiSanity.xml | 0 .../testSuites/{ => backend}/SearchExternalAPI.xml | 0 .../ci/testSuites/{ => backend}/artifacts.xml | 0 .../ci/testSuites/{ => backend}/cap_req.xml | 0 .../ci/testSuites/{ => backend}/category.xml | 0 .../ci/testSuites/{ => backend}/ciFull.xml | 0 .../ci/testSuites/{ => backend}/externalAPIs.xml | 0 .../ci/testSuites/{ => backend}/general.xml | 0 .../ci/testSuites/{ => backend}/imports.xml | 0 .../ci/testSuites/{ => backend}/normatives.xml | 0 .../ci/testSuites/{ => backend}/onapApiSanity.xml | 0 .../resources/ci/testSuites/{ => backend}/pass.xml | 0 .../ci/testSuites/{ => backend}/product.xml | 0 .../ci/testSuites/{ => backend}/productAPIs.xml | 0 .../ci/testSuites/{ => backend}/property.xml | 0 .../ci/testSuites/{ => backend}/resource.xml | 0 .../ci/testSuites/{ => backend}/sanity.xml | 0 .../ci/testSuites/{ => backend}/service.xml | 0 .../testSuites/{ => backend}/testngLifeCycle.xml | 0 .../resources/ci/testSuites/{ => backend}/user.xml | 0 .../src/test/resources/integration-test.json | 104 --------------------- 26 files changed, 67 insertions(+), 148 deletions(-) rename integration-tests/src/test/resources/ci/testSuites/{ => backend}/CRUDArtifacts.xml (100%) rename integration-tests/src/test/resources/ci/testSuites/{ => backend}/ExternalApiSanity.xml (100%) rename integration-tests/src/test/resources/ci/testSuites/{ => backend}/SearchExternalAPI.xml (100%) rename integration-tests/src/test/resources/ci/testSuites/{ => backend}/artifacts.xml (100%) rename integration-tests/src/test/resources/ci/testSuites/{ => backend}/cap_req.xml (100%) rename integration-tests/src/test/resources/ci/testSuites/{ => backend}/category.xml (100%) rename integration-tests/src/test/resources/ci/testSuites/{ => backend}/ciFull.xml (100%) rename integration-tests/src/test/resources/ci/testSuites/{ => backend}/externalAPIs.xml (100%) rename integration-tests/src/test/resources/ci/testSuites/{ => backend}/general.xml (100%) rename integration-tests/src/test/resources/ci/testSuites/{ => backend}/imports.xml (100%) rename integration-tests/src/test/resources/ci/testSuites/{ => backend}/normatives.xml (100%) rename integration-tests/src/test/resources/ci/testSuites/{ => backend}/onapApiSanity.xml (100%) rename integration-tests/src/test/resources/ci/testSuites/{ => backend}/pass.xml (100%) rename integration-tests/src/test/resources/ci/testSuites/{ => backend}/product.xml (100%) rename integration-tests/src/test/resources/ci/testSuites/{ => backend}/productAPIs.xml (100%) rename integration-tests/src/test/resources/ci/testSuites/{ => backend}/property.xml (100%) rename integration-tests/src/test/resources/ci/testSuites/{ => backend}/resource.xml (100%) rename integration-tests/src/test/resources/ci/testSuites/{ => backend}/sanity.xml (100%) rename integration-tests/src/test/resources/ci/testSuites/{ => backend}/service.xml (100%) rename integration-tests/src/test/resources/ci/testSuites/{ => backend}/testngLifeCycle.xml (100%) rename integration-tests/src/test/resources/ci/testSuites/{ => backend}/user.xml (100%) delete mode 100644 integration-tests/src/test/resources/integration-test.json diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index 6906e400bd..812705df46 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -35,7 +35,7 @@ limitations under the License. - + integration-test 9042 onap123#@! @@ -96,7 +96,6 @@ limitations under the License. com.aventstack extentreports 3.0.6 - test @@ -171,6 +170,70 @@ limitations under the License. + + + + org.seleniumhq.selenium + selenium-java + test + 2.53.1 + + + org.eclipse.jetty + jetty-util + + + io.netty + netty + + + + + net.lightbody.bmp + + browsermob-core + 2.1.4 + test + + + com.fasterxml.jackson.core + jackson-core + + + + + com.paulhammant + ngwebdriver + 0.9.7 + test + + + com.github.markusbernhardt + proxy-vole + 1.0.2 + test + + + org.hamcrest + hamcrest + ${hamcrest.version} + test + + + commons-net + commons-net + 3.3 + test + + + + @@ -599,7 +662,7 @@ limitations under the License. maven-failsafe-plugin - src/test/resources/ci/testSuites/onapApiSanity.xml + src/test/resources/ci/testSuites/backend/onapApiSanity.xml diff --git a/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/execute/devCI/ArtifactFromCsar.java b/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/execute/devCI/ArtifactFromCsar.java index 4d5847cbb6..84b34d16f7 100644 --- a/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/execute/devCI/ArtifactFromCsar.java +++ b/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/execute/devCI/ArtifactFromCsar.java @@ -42,18 +42,7 @@ import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; public class ArtifactFromCsar { - - public static void main(String[] args) throws Exception { - String zipFile = "C:\\Users\\rp955r\\Documents\\InTesting\\resource-CivfonboardedFdnt2f792348-csar.csar"; - -// Map combinedMap = combineHeatArtifacstWithFolderArtifacsToMap(zipFile); - - Map vfcArtifacts = ArtifactFromCsar.getVFCArtifacts(zipFile); - - System.out.println("1234o"); - } - public static Map combineHeatArtifacstWithFolderArtifacsToMap(String pathToCsar) throws Exception { return combineHeatArtifacstWithFolderArtifacsToMap(pathToCsar, "output"); } diff --git a/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/utils/rest/EcompUserRestUtils.java b/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/utils/rest/EcompUserRestUtils.java index 52f6e12880..133b4b5403 100644 --- a/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/utils/rest/EcompUserRestUtils.java +++ b/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/utils/rest/EcompUserRestUtils.java @@ -215,33 +215,4 @@ public class EcompUserRestUtils extends BaseRestUtils { return sendGetUserRolesRequest; } - - // TODO !!!!!!!!!!!!!! - /* - * Ask Eli if implementation of users is needed DELETE ECOMP USER - */ - - /* - * public static void main(String[] args) { EcompUser ecompUser = new - * EcompUser(); ecompUser.setFirstName("Test"); - * ecompUser.setLastName("Testovich"); - * ecompUser.setActive(true); - * - * EcompRole roleToUpdate = new EcompRole(); roleToUpdate.setId(new - * Long(6)); roleToUpdate.setName("PRODUCT_STRATEGIST"); List - * listOfRoles = new LinkedList<>(); listOfRoles.add(roleToUpdate); - * - * try { - * System.out.println("\n-----------------------------\n Testing pushUser"); - * System.out.println(pushUser(ecompUser)); - * System.out.println("\n-----------------------------\n Testing editUser"); - * System.out.println("\n-----------------------------\n Testing getUser"); - * // System.out.println(getUser(ecompUser.getLoginId())); System.out. - * println("\n-----------------------------\n Testing getAllUsers"); // - * System.out.println(getAllUsers()); System.out. - * println("\n-----------------------------\n Testing getAllAvailableRoles" - * ); // System.out.println(getAllAvailableRoles().toString()); System.out. - * println("\n-----------------------------\n Testing pushUserRoles"); - * TODO Auto-generated catch block e.printStackTrace(); } } - */ } diff --git a/integration-tests/src/test/resources/ci/conf/attsdc.yaml b/integration-tests/src/test/resources/ci/conf/attsdc.yaml index 29357b28b2..21dbe64d14 100644 --- a/integration-tests/src/test/resources/ci/conf/attsdc.yaml +++ b/integration-tests/src/test/resources/ci/conf/attsdc.yaml @@ -26,7 +26,7 @@ configurationFile: ../catalog-be/src/main/resources/config/configuration.yaml importTypesConfigDir: src/test/resources/CI/importTypesTest -janusGraphPropertiesFile: src/main/resources/ci/conf/janusgraph.properties +janusGraphPropertiesFile: src/test/resources/ci/conf/janusgraph.properties cassandraHost: 127.0.0.1 cassandraAuthenticate: false cassandraUsername: koko diff --git a/integration-tests/src/test/resources/ci/testSuites/CRUDArtifacts.xml b/integration-tests/src/test/resources/ci/testSuites/backend/CRUDArtifacts.xml similarity index 100% rename from integration-tests/src/test/resources/ci/testSuites/CRUDArtifacts.xml rename to integration-tests/src/test/resources/ci/testSuites/backend/CRUDArtifacts.xml diff --git a/integration-tests/src/test/resources/ci/testSuites/ExternalApiSanity.xml b/integration-tests/src/test/resources/ci/testSuites/backend/ExternalApiSanity.xml similarity index 100% rename from integration-tests/src/test/resources/ci/testSuites/ExternalApiSanity.xml rename to integration-tests/src/test/resources/ci/testSuites/backend/ExternalApiSanity.xml diff --git a/integration-tests/src/test/resources/ci/testSuites/SearchExternalAPI.xml b/integration-tests/src/test/resources/ci/testSuites/backend/SearchExternalAPI.xml similarity index 100% rename from integration-tests/src/test/resources/ci/testSuites/SearchExternalAPI.xml rename to integration-tests/src/test/resources/ci/testSuites/backend/SearchExternalAPI.xml diff --git a/integration-tests/src/test/resources/ci/testSuites/artifacts.xml b/integration-tests/src/test/resources/ci/testSuites/backend/artifacts.xml similarity index 100% rename from integration-tests/src/test/resources/ci/testSuites/artifacts.xml rename to integration-tests/src/test/resources/ci/testSuites/backend/artifacts.xml diff --git a/integration-tests/src/test/resources/ci/testSuites/cap_req.xml b/integration-tests/src/test/resources/ci/testSuites/backend/cap_req.xml similarity index 100% rename from integration-tests/src/test/resources/ci/testSuites/cap_req.xml rename to integration-tests/src/test/resources/ci/testSuites/backend/cap_req.xml diff --git a/integration-tests/src/test/resources/ci/testSuites/category.xml b/integration-tests/src/test/resources/ci/testSuites/backend/category.xml similarity index 100% rename from integration-tests/src/test/resources/ci/testSuites/category.xml rename to integration-tests/src/test/resources/ci/testSuites/backend/category.xml diff --git a/integration-tests/src/test/resources/ci/testSuites/ciFull.xml b/integration-tests/src/test/resources/ci/testSuites/backend/ciFull.xml similarity index 100% rename from integration-tests/src/test/resources/ci/testSuites/ciFull.xml rename to integration-tests/src/test/resources/ci/testSuites/backend/ciFull.xml diff --git a/integration-tests/src/test/resources/ci/testSuites/externalAPIs.xml b/integration-tests/src/test/resources/ci/testSuites/backend/externalAPIs.xml similarity index 100% rename from integration-tests/src/test/resources/ci/testSuites/externalAPIs.xml rename to integration-tests/src/test/resources/ci/testSuites/backend/externalAPIs.xml diff --git a/integration-tests/src/test/resources/ci/testSuites/general.xml b/integration-tests/src/test/resources/ci/testSuites/backend/general.xml similarity index 100% rename from integration-tests/src/test/resources/ci/testSuites/general.xml rename to integration-tests/src/test/resources/ci/testSuites/backend/general.xml diff --git a/integration-tests/src/test/resources/ci/testSuites/imports.xml b/integration-tests/src/test/resources/ci/testSuites/backend/imports.xml similarity index 100% rename from integration-tests/src/test/resources/ci/testSuites/imports.xml rename to integration-tests/src/test/resources/ci/testSuites/backend/imports.xml diff --git a/integration-tests/src/test/resources/ci/testSuites/normatives.xml b/integration-tests/src/test/resources/ci/testSuites/backend/normatives.xml similarity index 100% rename from integration-tests/src/test/resources/ci/testSuites/normatives.xml rename to integration-tests/src/test/resources/ci/testSuites/backend/normatives.xml diff --git a/integration-tests/src/test/resources/ci/testSuites/onapApiSanity.xml b/integration-tests/src/test/resources/ci/testSuites/backend/onapApiSanity.xml similarity index 100% rename from integration-tests/src/test/resources/ci/testSuites/onapApiSanity.xml rename to integration-tests/src/test/resources/ci/testSuites/backend/onapApiSanity.xml diff --git a/integration-tests/src/test/resources/ci/testSuites/pass.xml b/integration-tests/src/test/resources/ci/testSuites/backend/pass.xml similarity index 100% rename from integration-tests/src/test/resources/ci/testSuites/pass.xml rename to integration-tests/src/test/resources/ci/testSuites/backend/pass.xml diff --git a/integration-tests/src/test/resources/ci/testSuites/product.xml b/integration-tests/src/test/resources/ci/testSuites/backend/product.xml similarity index 100% rename from integration-tests/src/test/resources/ci/testSuites/product.xml rename to integration-tests/src/test/resources/ci/testSuites/backend/product.xml diff --git a/integration-tests/src/test/resources/ci/testSuites/productAPIs.xml b/integration-tests/src/test/resources/ci/testSuites/backend/productAPIs.xml similarity index 100% rename from integration-tests/src/test/resources/ci/testSuites/productAPIs.xml rename to integration-tests/src/test/resources/ci/testSuites/backend/productAPIs.xml diff --git a/integration-tests/src/test/resources/ci/testSuites/property.xml b/integration-tests/src/test/resources/ci/testSuites/backend/property.xml similarity index 100% rename from integration-tests/src/test/resources/ci/testSuites/property.xml rename to integration-tests/src/test/resources/ci/testSuites/backend/property.xml diff --git a/integration-tests/src/test/resources/ci/testSuites/resource.xml b/integration-tests/src/test/resources/ci/testSuites/backend/resource.xml similarity index 100% rename from integration-tests/src/test/resources/ci/testSuites/resource.xml rename to integration-tests/src/test/resources/ci/testSuites/backend/resource.xml diff --git a/integration-tests/src/test/resources/ci/testSuites/sanity.xml b/integration-tests/src/test/resources/ci/testSuites/backend/sanity.xml similarity index 100% rename from integration-tests/src/test/resources/ci/testSuites/sanity.xml rename to integration-tests/src/test/resources/ci/testSuites/backend/sanity.xml diff --git a/integration-tests/src/test/resources/ci/testSuites/service.xml b/integration-tests/src/test/resources/ci/testSuites/backend/service.xml similarity index 100% rename from integration-tests/src/test/resources/ci/testSuites/service.xml rename to integration-tests/src/test/resources/ci/testSuites/backend/service.xml diff --git a/integration-tests/src/test/resources/ci/testSuites/testngLifeCycle.xml b/integration-tests/src/test/resources/ci/testSuites/backend/testngLifeCycle.xml similarity index 100% rename from integration-tests/src/test/resources/ci/testSuites/testngLifeCycle.xml rename to integration-tests/src/test/resources/ci/testSuites/backend/testngLifeCycle.xml diff --git a/integration-tests/src/test/resources/ci/testSuites/user.xml b/integration-tests/src/test/resources/ci/testSuites/backend/user.xml similarity index 100% rename from integration-tests/src/test/resources/ci/testSuites/user.xml rename to integration-tests/src/test/resources/ci/testSuites/backend/user.xml diff --git a/integration-tests/src/test/resources/integration-test.json b/integration-tests/src/test/resources/integration-test.json deleted file mode 100644 index dec9c2f042..0000000000 --- a/integration-tests/src/test/resources/integration-test.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "name": "${it.env.name}", - "description": "OpenSource-${it.env.name}", - "json_class": "Chef::Environment", - "chef_type": "environment", - - "default_attributes": { - "disableHttp": false, - "CS_VIP": "sdc-cs", - "BE_VIP": "sdc-BE", - "ONBOARDING_BE_VIP": "sdc-onboard-BE", - "FE_VIP": "sdc-FE", - "DCAE_BE_VIP": "localhost", - "DCAE_FE_VIP": "localhost", - "DCAE_TOSCA_LAB_VIP": "localhost", - "interfaces": { - "application": "eth0", - "private": "eth1" - }, - "ECompP": { - "ecomp_rest_url": "http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/auxapi", - "ecomp_redirect_url": "http://portal.api.simpledemo.openecomp.org:8989/ECOMPPORTAL/login.htm", - "cipher_key": "AGLDdG4D04BKm2IxIWEr8o==", - "portal_user": "Ipwxi2oLvDxctMA1royaRw1W0jhucLx+grHzci3ePIA=", - "portal_pass": "j85yNhyIs7zKYbR1VlwEfNhS6b7Om4l0Gx5O8931sCI=", - "portal_app_name": "Ipwxi2oLvDxctMA1royaRw1W0jhucLx+grHzci3ePIA=" - }, - "UEB": { - "PublicKey": "iPIxkpAMI8qTcQj8", - "SecretKey": "Ehq3WyT4bkif4zwgEbvshGal", - "fqdn": ["10.0.11.1", "10.0.11.1"] - }, - "Nodes": { - "CS": [ - "sdc-cs" - ], - "BE": "sdc-BE", - "ONBOARDING_BE": "sdc-onboard-BE", - "FE": "sdc-FE" - }, - "VnfRepo": { - "vnfRepoPort": "8702", - "vnfRepoHost": "10.0.14.1" - } - }, - "override_attributes": { - "FE": { - "http_port": "8181", - "https_port": "9443", - "domain_name": "sdc" - }, - "BE": { - "http_port": "8080", - "https_port": "8443", - "domain_name": "sdc" - }, - "ONBOARDING_BE": { - "http_port": "8081", - "https_port": "8445", - "domain_name": "sdc", - "catalog_notification_url": "%s://%s:%s/sdc2/rest/v1/catalog/notif/vsp/" - }, - "cassandra": { - "cassandra_port": 9042, - "concurrent_reads": "32", - "num_tokens": "256", - "data_dir": "/var/lib/cassandra/data", - "hinted_handoff_enabled": "true", - "cassandra_user": "${it.sdc.user}", - "cassandra_password": "${it.sdc.password}", - "concurrent_writes": "32", - "cluster_name": "${it.sdc.cluster.name}", - "datacenter_name": "${it.sdc.cluster.name}", - "multithreaded_compaction": "false", - "cache_dir": "/var/lib/cassandra/saved_caches", - "log_file": "/var/lib/cassandra/log/system.log", - "phi_convict_threshold": "8", - "commitlog_dir": "/var/lib/cassandra/commitlog", - "socket_read_timeout": "40000", - "socket_connect_timeout": "40000", - "janusgraph_connection_timeout": "20000", - "replication_factor": "1" - }, - "DMAAP": { - "consumer": { - "host": "dcae-mrtr.com:3905", - "topic": "operationalEnvironmentEvent", - "serviceName": "dcae-mrtr.com:3905/events", - "environment": "${it.env.name}", - "partner": "BOT_R", - "username": "user1@sdc.com", - "password": "password==" - }, - "producer": { - "host": "olsd004.com:3905", - "topic": "SDC-FACADE-NOTIF-v1 ", - "serviceName": "dmaap.com:3905/events", - "environment": "${it.env.name}", - "username": "user1@sdc.com", - "password": "password==" - } - } - } -} -- 2.16.6