diff options
Diffstat (limited to 'bootstrap/vagrant-onap/tests')
-rw-r--r-- | bootstrap/vagrant-onap/tests/_test_base | 3 | ||||
-rw-r--r-- | bootstrap/vagrant-onap/tests/projects.txt | 209 | ||||
-rw-r--r-- | bootstrap/vagrant-onap/tests/test_aai | 23 | ||||
-rw-r--r-- | bootstrap/vagrant-onap/tests/test_ccsdk | 8 | ||||
-rw-r--r-- | bootstrap/vagrant-onap/tests/test_dcae | 1 | ||||
-rw-r--r-- | bootstrap/vagrant-onap/tests/test_functions | 54 | ||||
-rw-r--r-- | bootstrap/vagrant-onap/tests/test_mso | 10 | ||||
-rw-r--r-- | bootstrap/vagrant-onap/tests/test_multicloud | 9 | ||||
-rw-r--r-- | bootstrap/vagrant-onap/tests/test_policy | 3 | ||||
-rw-r--r-- | bootstrap/vagrant-onap/tests/test_sdnc | 23 | ||||
-rw-r--r-- | bootstrap/vagrant-onap/tests/test_vfc | 5 | ||||
-rw-r--r-- | bootstrap/vagrant-onap/tests/test_vnfsdk | 57 | ||||
-rw-r--r-- | bootstrap/vagrant-onap/tests/test_vvp | 55 |
13 files changed, 403 insertions, 57 deletions
diff --git a/bootstrap/vagrant-onap/tests/_test_base b/bootstrap/vagrant-onap/tests/_test_base index 155de98bb..7d0415a44 100644 --- a/bootstrap/vagrant-onap/tests/_test_base +++ b/bootstrap/vagrant-onap/tests/_test_base @@ -15,6 +15,9 @@ function main { echo "ok $((i+1)) - test_${covered_functions[$i]}" # Teardown process + if ! is_package_installed docker-ce; then + docker images -q | xargs docker rmi -f + fi dpkg --get-selections > installed-software_new sort -o installed-software_new installed-software_new apt-get purge -y -qq $(comm -3 installed-software installed-software_new | awk '{print $1}') diff --git a/bootstrap/vagrant-onap/tests/projects.txt b/bootstrap/vagrant-onap/tests/projects.txt new file mode 100644 index 000000000..0aba508c9 --- /dev/null +++ b/bootstrap/vagrant-onap/tests/projects.txt @@ -0,0 +1,209 @@ +aaf/authz +aaf/cadi +aaf/inno +aaf/luaplugin +aai/aai-common +aai/aai-config +aai/aai-data +aai/aai-service +aai/babel +aai/champ +aai/data-router +aai/esr-gui +aai/esr-server +aai/gizmo +aai/logging-service +aai/model-loader +aai/resources +aai/rest-client +aai/router-core +aai/search-data-service +aai/sparky-be +aai/sparky-fe +aai/test-config +aai/traversal +appc +appc/deployment +ccsdk/dashboard +ccsdk/distribution +ccsdk/parent +ccsdk/platform/blueprints +ccsdk/platform/nbapi +ccsdk/platform/plugins +ccsdk/sli/adaptors +ccsdk/sli/core +ccsdk/sli/northbound +ccsdk/sli/plugins +ccsdk/storage/esaas +ccsdk/storage/pgaas +ccsdk/utils +ci-management +clamp +cli +dcae +dcae/apod +dcae/apod/analytics +dcae/apod/buildtools +dcae/apod/cdap +dcae/collectors +dcae/collectors/ves +dcae/controller +dcae/controller/analytics +dcae/dcae-inventory +dcae/demo +dcae/demo/startup +dcae/demo/startup/aaf +dcae/demo/startup/controller +dcae/demo/startup/message-router +dcae/dmaapbc +dcae/operation +dcae/operation/utils +dcae/orch-dispatcher +dcae/pgaas +dcae/utils +dcae/utils/buildtools +dcaegen2 +dcaegen2/analytics +dcaegen2/analytics/tca +dcaegen2/collectors +dcaegen2/collectors/snmptrap +dcaegen2/collectors/ves +dcaegen2/deployments +dcaegen2/platform +dcaegen2/platform/blueprints +dcaegen2/platform/cdapbroker +dcaegen2/platform/cli +dcaegen2/platform/configbinding +dcaegen2/platform/deployment-handler +dcaegen2/platform/inventory-api +dcaegen2/platform/plugins +dcaegen2/platform/policy-handler +dcaegen2/platform/registrator +dcaegen2/platform/servicechange-handler +dcaegen2/utils +demo +dmaap/buscontroller +dmaap/datarouter +dmaap/dbcapi +dmaap/messagerouter/dmaapclient +dmaap/messagerouter/messageservice +dmaap/messagerouter/mirroragent +dmaap/messagerouter/msgrtr +doc +doc/tools +ecompsdkos +externalapi/nbi +holmes/common +holmes/dsa +holmes/engine-management +holmes/rule-management +integration +logging-analytics +modeling/modelspec +modeling/toscaparsers +msb/apigateway +msb/discovery +msb/java-sdk +msb/swagger-sdk +mso +mso/chef-repo +mso/docker-config +mso/libs +mso/mso-config +multicloud/azure +multicloud/framework +multicloud/openstack +multicloud/openstack/vmware +multicloud/openstack/windriver +ncomp +ncomp/cdap +ncomp/core +ncomp/docker +ncomp/maven +ncomp/openstack +ncomp/sirius +ncomp/sirius/manager +ncomp/utils +oom +oom/registrator +oparent +optf/cmso +optf/has +optf/osdf +policy/api +policy/common +policy/docker +policy/drools-applications +policy/drools-pdp +policy/engine +policy/gui +policy/pap +policy/pdp +portal +portal/sdk +sdc +sdc/jtosca +sdc/sdc-distribution-client +sdc/sdc-docker-base +sdc/sdc-titan-cassandra +sdc/sdc-tosca +sdc/sdc-workflow-designer +sdnc/adaptors +sdnc/architecture +sdnc/core +sdnc/features +sdnc/northbound +sdnc/oam +sdnc/parent +sdnc/plugins +so +so/chef-repo +so/docker-config +so/libs +so/so-config +testsuite +testsuite/heatbridge +testsuite/properties +testsuite/python-testing-utils +ui +ui/dmaapbc +university +usecase-ui +usecase-ui/server +vfc/gvnfm/vnflcm +vfc/gvnfm/vnfmgr +vfc/gvnfm/vnfres +vfc/nfvo/catalog +vfc/nfvo/driver/ems +vfc/nfvo/driver/sfc +vfc/nfvo/driver/vnfm/gvnfm +vfc/nfvo/driver/vnfm/svnfm +vfc/nfvo/lcm +vfc/nfvo/resmanagement +vfc/nfvo/wfengine +vid +vid/asdcclient +vnfrqts/epics +vnfrqts/guidelines +vnfrqts/requirements +vnfrqts/testcases +vnfrqts/usecases +vnfsdk/compliance +vnfsdk/functest +vnfsdk/lctest +vnfsdk/model +vnfsdk/pkgtools +vnfsdk/refrepo +vnfsdk/validation +vvp/ansible-ice-bootstrap +vvp/cms +vvp/devkit +vvp/documentation +vvp/engagementmgr +vvp/gitlab +vvp/image-scanner +vvp/jenkins +vvp/portal +vvp/postgresql +vvp/test-engine +vvp/validation-scripts diff --git a/bootstrap/vagrant-onap/tests/test_aai b/bootstrap/vagrant-onap/tests/test_aai index 5ff62c156..10777d678 100644 --- a/bootstrap/vagrant-onap/tests/test_aai +++ b/bootstrap/vagrant-onap/tests/test_aai @@ -8,11 +8,6 @@ covered_functions=( "install_hadoop" "install_haproxy" "clone_all_aai_repos" "compile_aai_repos" "setup_titan" "install_hbase" "install_ajsc_aai" "install_model_loader" ) -# TODO(electrocucaracha): Remove/Modify functions that doesn't support proxy settings -if [ -z $http_proxy ] & [ -z $https_proxy ]; then - covered_functions=(${covered_functions[@]} "install_hbase") -fi - # test_install_hadoop() - Verify that Hadoop is downloaded and started properly function test_install_hadoop { install_hadoop @@ -39,7 +34,12 @@ function test_clone_all_aai_repos { asserts_file_exist $aai_src_folder/aai-config/cookbooks/aai-resources/runlist-aai-resources.json asserts_file_exist $aai_src_folder/aai-data/environments/solo.json asserts_file_exist $aai_src_folder/aai-service/pom.xml + asserts_file_exist $aai_src_folder/babel/README.md + asserts_file_exist $aai_src_folder/champ/pom.xml asserts_file_exist $aai_src_folder/data-router/pom.xml + asserts_file_exist $aai_src_folder/esr-gui/pom.xml + asserts_file_exist $aai_src_folder/esr-server/pom.xml + asserts_file_exist $aai_src_folder/gizmo/pom.xml asserts_file_exist $aai_src_folder/logging-service/pom.xml asserts_file_exist $aai_src_folder/model-loader/pom.xml asserts_file_exist $aai_src_folder/resources/pom.xml @@ -57,14 +57,13 @@ function test_compile_aai_repos { clone_all_aai_repos compile_aai_repos - asserts_file_exist $aai_src_folder/aai-common/aai-annotations/target/aai-annotations-1.1.0-SNAPSHOT.jar - asserts_file_exist $aai_src_folder/aai-common/aai-auth/target/aai-auth-1.1.0-SNAPSHOT.jar - asserts_file_exist $aai_src_folder/aai-common/aai-core/target/aai-core-1.1.0-SNAPSHOT.jar - asserts_file_exist $aai_src_folder/aai-common/aai-schema/target/aai-schema-1.1.0-SNAPSHOT.jar + for common in annotations auth core schema utils; do + asserts_file_exist $aai_src_folder/aai-common/aai-$common/target/aai-$common-1.1.0-SNAPSHOT.jar + done - asserts_file_exist $aai_src_folder/logging-service/common-logging/target/common-logging-1.1.0-SNAPSHOT.jar - asserts_file_exist $aai_src_folder/logging-service/eelf-logging/target/eelf-logging-1.1.0-SNAPSHOT.jar - asserts_file_exist $aai_src_folder/logging-service/logging-api/target/logging-api-1.1.0-SNAPSHOT.jar + for service in common-logging eelf-logging logging-api; do + asserts_file_exist $aai_src_folder/logging-service/$service/target/$service-1.1.0-SNAPSHOT.jar + done asserts_file_exist $aai_src_folder/resources/aai-resources/target/aai-resources.jar asserts_file_exist $aai_src_folder/traversal/aai-traversal/target/traversal.jar diff --git a/bootstrap/vagrant-onap/tests/test_ccsdk b/bootstrap/vagrant-onap/tests/test_ccsdk index 2d2b87a54..81bdd4877 100644 --- a/bootstrap/vagrant-onap/tests/test_ccsdk +++ b/bootstrap/vagrant-onap/tests/test_ccsdk @@ -27,13 +27,13 @@ function test_clone_ccsdk_repos { } # test_compile_ccsdk_repos() - Verify the compilation of CCSDK repositories -function compile_ccsdk_repos { +function test_compile_ccsdk_repos { clone_ccsdk_repos compile_ccsdk_repos - asserts_file_exist $ccsdk_src_folder/dashboard/oom-app-common/target/oom-app-common-1.1.0-SNAPSHOT.jar - asserts_file_exist $ccsdk_src_folder/dashboard/oom-app-os/target/oom-app-os-1.1.0-SNAPSHOT.war - asserts_file_exist $ccsdk_src_folder/dashboard/oom-app-overlay/target/oom-app-overlay-1.1.0-SNAPSHOT.war + asserts_file_exist $ccsdk_src_folder/dashboard/ccsdk-app-common/target/ccsdk-app-common-1.1.0-SNAPSHOT.jar + asserts_file_exist $ccsdk_src_folder/dashboard/ccsdk-app-os/target/ccsdk-app-os-1.1.0-SNAPSHOT.war + asserts_file_exist $ccsdk_src_folder/dashboard/ccsdk-app-overlay/target/ccsdk-app-overlay-1.1.0-SNAPSHOT.war asserts_file_exist $ccsdk_src_folder/distribution/dgbuilder/target/dgbuilder.0.1.0-SNAPSHOT.zip asserts_file_exist $ccsdk_src_folder/distribution/platform-logic/installer/target/platform-logic-installer-0.1.0-SNAPSHOT.zip asserts_file_exist $ccsdk_src_folder/platform/nbapi/target/commonnbapi-0.0.3.war diff --git a/bootstrap/vagrant-onap/tests/test_dcae b/bootstrap/vagrant-onap/tests/test_dcae index 104cadd12..c6887cd78 100644 --- a/bootstrap/vagrant-onap/tests/test_dcae +++ b/bootstrap/vagrant-onap/tests/test_dcae @@ -28,6 +28,7 @@ function test_clone_all_dcae_repos { asserts_file_exist $dcae_src_folder/dmaapbc/pom.xml asserts_file_exist $dcae_src_folder/operation/README.md asserts_file_exist $dcae_src_folder/operation/utils/pom.xml + asserts_file_exist $dcae_src_folder/orch-dispatcher/LICENSE.txt asserts_file_exist $dcae_src_folder/pgaas/LICENSE.txt asserts_file_exist $dcae_src_folder/utils/README.md asserts_file_exist $dcae_src_folder/utils/buildtools/LICENSE.txt diff --git a/bootstrap/vagrant-onap/tests/test_functions b/bootstrap/vagrant-onap/tests/test_functions index 17a66313a..3ab5828cb 100644 --- a/bootstrap/vagrant-onap/tests/test_functions +++ b/bootstrap/vagrant-onap/tests/test_functions @@ -7,14 +7,10 @@ covered_functions=( "create_configuration_files" "clone_repo" "install_dev_tools" "configure_bind" "install_java" "install_maven" "install_nodejs" "install_python" "install_docker" "pull_docker_image" "install_docker_compose" "configure_service" -"start_ODL" "compile_src" "build_docker_image" +"start_ODL" "compile_src" "build_docker_image" "docker_openecomp_login" +"pull_openecomp_image" "pull_onap_image" "coverity_repos" ) -# TODO(electrocucaracha): Remove/Modify functions that doesn't support proxy settings -if [ -z $http_proxy ] & [ -z $https_proxy ]; then - covered_functions=(${covered_functions[@]} "docker_openecomp_login" "pull_openecomp_image") -fi - # test_create_configuration_files() - Verify the creation of a configuration files function test_create_configuration_files { create_configuration_files @@ -33,14 +29,22 @@ function test_docker_openecomp_login { docker_openecomp_login } -# test_pull_openecomp_image() - Verify the addition of a OpenECOMP container image +# test_pull_openecomp_image() - Verify the OpenECOMP container image pulling process function test_pull_openecomp_image { - pull_openecomp_image portalapps ep:1610-1 + local image_name=portal-apps + unset docker_version + pull_openecomp_image $image_name - asserts_installed_package docker-ce - asserts_image ep:1610-1 + asserts_image $nexus_docker_repo/openecomp/$image_name +} - docker rmi -f ep:1610-1 +# test_pull_onap_image() - Verify the ONAP cointainer pulling process +function test_pull_onap_image { + local image_name=portal-apps + unset docker_version + pull_onap_image $image_name + + asserts_image $nexus_docker_repo/onap/$image_name } # test_clone_repo() - Verify cloning and pulling source code from repositories @@ -117,8 +121,6 @@ function test_pull_docker_image { pull_docker_image $image asserts_image $image - - docker rmi -f $image } # test_install_docker_compose() - Verify the correct installation of Docker Compose tool @@ -161,8 +163,32 @@ function test_build_docker_image { build_docker_image $git_src_folder/ccsdk/distribution/ubuntu docker asserts_image onap/ccsdk-ubuntu-image +} - docker rmi -f onap/ccsdk-ubuntu-image +# test_coverity_repos() - Verify that all the repos are covered by scripts +function test_coverity_repos { + # Get repositories list from source code files + repos_list=() + for module in $( stat -c "%F %n" /var/onap/* | grep -v "_\|functions\|commons\|files" | cut -d' ' -f 3-); do + source $module + module_repo_list=$(eval echo \${$(basename $module)_repos[@]}) + repos_list=(${repos_list[@]} ${module_repo_list[@]}) + done + + pushd /var/onap_tests/ + cp projects.txt remaining_projects.txt + for covered_repo in "${repos_list[@]}"; do + sed -i '/^'${covered_repo//\//\\/}'$/d' remaining_projects.txt + done + + threshold=75 + num_projects=$(wc -l < projects.txt) + num_remaining_projects=$(wc -l < remaining_projects.txt) + coverage=`echo "scale=2; 100-($num_remaining_projects/$num_projects*100)" | bc | cut -d . -f 1` + if [ $coverage -lt $threshold ]; then + raise_error "There are repositories that are not covered by scripts" + fi + popd } if [ "$1" != '*' ]; then diff --git a/bootstrap/vagrant-onap/tests/test_mso b/bootstrap/vagrant-onap/tests/test_mso index cb7b014dc..deea7bbf8 100644 --- a/bootstrap/vagrant-onap/tests/test_mso +++ b/bootstrap/vagrant-onap/tests/test_mso @@ -4,7 +4,7 @@ source /var/onap_tests/_test_base source /var/onap/mso covered_functions=( -"clone_all_mso_repos" "compile_all_mso_repos" "install_mso" "install_mso_docker_config" +"clone_all_mso_repos" "compile_all_mso_repos" "get_mso_images" "install_mso" ) # test_clone_all_mso_repos() - Verify the source code retrieve of MSO project @@ -40,8 +40,8 @@ function test_compile_all_mso_repos { asserts_file_exist $src_folder/libs/swift-model/target/swift-model-1.1.0-SNAPSHOT.jar } -# test_install_mso() - Verify the creation of MSO Docker images -function test_install_mso { +# test_get_mso_images() - Verify the creation of MSO Docker images +function test_get_mso_images { clone_all_mso_repos install_mso @@ -50,8 +50,8 @@ function test_install_mso { done } -# test_install_mso_docker_config - Verify the execution of MSO Docker images -function test_install_mso_docker_config { +# test_install_mso - Verify the execution of MSO Docker images +function test_install_mso { clone_all_mso_repos install_mso install_mso_docker_config diff --git a/bootstrap/vagrant-onap/tests/test_multicloud b/bootstrap/vagrant-onap/tests/test_multicloud index 3d60533f7..374272c1c 100644 --- a/bootstrap/vagrant-onap/tests/test_multicloud +++ b/bootstrap/vagrant-onap/tests/test_multicloud @@ -4,7 +4,7 @@ source /var/onap_tests/_test_base source /var/onap/multicloud covered_functions=( -"clone_multicloud_repos" "compile_multicloud_repos" "install_multicloud" +"clone_multicloud_repos" "compile_multicloud_repos" "get_multicloud_images" "install_multicloud" ) # test_clone_multicloud_repos() - Verify that Multi Cloud repositories are cloned properly @@ -24,9 +24,16 @@ function test_compile_multicloud_repos { asserts_file_exist $multicloud_src_folder/openstack/newton/target/multicloud-openstack-newton-1.0.0-SNAPSHOT.zip } +# test_get_multicloud_images() - +function test_get_multicloud_images { + clone_multicloud_repos + get_multicloud_images +} + # test_install_multicloud() - Verify the built and start of Multi Cloud services function test_install_multicloud { clone_multicloud_repos + get_multicloud_images install_multicloud } diff --git a/bootstrap/vagrant-onap/tests/test_policy b/bootstrap/vagrant-onap/tests/test_policy index 0c544cd7d..08231fc7a 100644 --- a/bootstrap/vagrant-onap/tests/test_policy +++ b/bootstrap/vagrant-onap/tests/test_policy @@ -49,8 +49,7 @@ function test_compile_all_policy_repos { done asserts_file_exist $policy_src_folder/drools-applications/controlloop/packages/basex/target/basex-1.1.0-SNAPSHOT.tar.gz asserts_file_exist $policy_src_folder/drools-applications/controlloop/templates/template.demo/target/template.demo-1.1.0-SNAPSHOT.jar - asserts_file_exist $policy_src_folder/drools-applications/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/target/archetype-cl-legacy-1.1.0-SNAPSHOT.jar - asserts_file_exist $policy_src_folder/drools-applications/controlloop/templates/template.demo.v1.0.0/template.demo/target/demo-1.1.0-SNAPSHOT.jar + asserts_file_exist $policy_src_folder/drools-applications/controlloop/templates/template.demo/target/template.demo-1.1.0-SNAPSHOT.jar for feature in eelf healthcheck session-persistence; do asserts_file_exist $policy_src_folder/drools-pdp/feature-$feature/target/feature-$feature-1.1.0-SNAPSHOT.jar done diff --git a/bootstrap/vagrant-onap/tests/test_sdnc b/bootstrap/vagrant-onap/tests/test_sdnc index ddc1d9c6b..7b54749dd 100644 --- a/bootstrap/vagrant-onap/tests/test_sdnc +++ b/bootstrap/vagrant-onap/tests/test_sdnc @@ -12,12 +12,12 @@ function test_clone_all_sdnc_repos { clone_all_sdnc_repos asserts_file_exist $sdnc_src_folder/adaptors/pom.xml - # asserts_file_exist $sdnc_src_folder/architecture/pom.xml + asserts_file_exist $sdnc_src_folder/architecture/docs/index.rst asserts_file_exist $sdnc_src_folder/core/pom.xml - # asserts_file_exist $sdnc_src_folder/features/pom.xml + asserts_file_exist $sdnc_src_folder/features/docs/index.rst asserts_file_exist $sdnc_src_folder/northbound/pom.xml asserts_file_exist $sdnc_src_folder/oam/pom.xml - # asserts_file_exist $sdnc_src_folder/parent/pom.xml + asserts_file_exist $sdnc_src_folder/parent/docs/index.rst asserts_file_exist $sdnc_src_folder/plugins/pom.xml } @@ -27,19 +27,12 @@ function test_compile_all_sdnc_repos { compile_all_sdnc_repos for component in generic-resource-api vnfapi vnftools; do - if [[ "$component" != "generic-resource-api" ]]; then - if [[ "$component" == "vnfapi" ]]; then - asserts_file_exist $sdnc_src_folder/northbound/vnfapi/model/target/vnfapi-model-1.2.0-SNAPSHOT.jar - fi - asserts_file_exist $sdnc_src_folder/northbound/$component/installer/target/sdnc-$component-1.2.0-SNAPSHOT-installer.zip - asserts_file_exist $sdnc_src_folder/northbound/$component/features/target/$component-features-1.2.0-SNAPSHOT.jar - asserts_file_exist $sdnc_src_folder/northbound/$component/provider/target/$component-provider-1.2.0-SNAPSHOT.jar - else - asserts_file_exist $sdnc_src_folder/northbound/generic-resource-api/features/target/generic-resource-api.features-1.2.0-SNAPSHOT.jar - asserts_file_exist $sdnc_src_folder/northbound/generic-resource-api/installer/target/sdnc-generic-resources-api-1.2.0-SNAPSHOT-installer.zip - asserts_file_exist $sdnc_src_folder/northbound/generic-resource-api/model/target/generic-resource-api.model-1.2.0-SNAPSHOT.jar - asserts_file_exist $sdnc_src_folder/northbound/generic-resource-api/provider/target/generic-resource-api.provider-1.2.0-SNAPSHOT.jar + if [[ "$component" == "vnfapi" ]]; then + asserts_file_exist $sdnc_src_folder/northbound/vnfapi/model/target/vnfapi-model-1.2.0-SNAPSHOT.jar fi + asserts_file_exist $sdnc_src_folder/northbound/$component/installer/target/sdnc-$component-1.2.0-SNAPSHOT-installer.zip + asserts_file_exist $sdnc_src_folder/northbound/$component/features/target/$component-features-1.2.0-SNAPSHOT.jar + asserts_file_exist $sdnc_src_folder/northbound/$component/provider/target/$component-provider-1.2.0-SNAPSHOT.jar done asserts_file_exist $sdnc_src_folder/oam/admportal/target/admportal.*-SNAPSHOT.zip asserts_file_exist $sdnc_src_folder/oam/dgbuilder/target/dgbuilder.*-SNAPSHOT.zip diff --git a/bootstrap/vagrant-onap/tests/test_vfc b/bootstrap/vagrant-onap/tests/test_vfc index 16e517a5e..53d9c0d5e 100644 --- a/bootstrap/vagrant-onap/tests/test_vfc +++ b/bootstrap/vagrant-onap/tests/test_vfc @@ -4,10 +4,7 @@ source /var/onap_tests/_test_base source /var/onap/vfc covered_functions=( -"clone_all_vfc_repos" "compile_all_vfc_repos" "install_vfc" -"get_vfc_images" "run_vfc_images" "build_nfvo_lcm_image" -"build_gvnfm_lcm_image" "build_gvnfm_vnfmgr_image" "build_gvnfm_vnfres_image" -"build_nfvo_lcm_image" "build_nfvo_vnfm_gvnfmadapter_image" +"clone_all_vfc_repos" "compile_all_vfc_repos" "install_vfc" "get_vfc_images" ) # test_clone_all_vfc_repos() - Verify cloning and pulling source code from repositories diff --git a/bootstrap/vagrant-onap/tests/test_vnfsdk b/bootstrap/vagrant-onap/tests/test_vnfsdk new file mode 100644 index 000000000..250a9fcc5 --- /dev/null +++ b/bootstrap/vagrant-onap/tests/test_vnfsdk @@ -0,0 +1,57 @@ +#!/bin/bash + +source /var/onap_tests/_test_base +source /var/onap/vnfsdk + +covered_functions=( +"clone_all_vnfsdk_repos" "compile_all_vnfsdk_repos" "get_vnfsdk_images" "install_vnfsdk" +) + +# test_clone_all_vnfsdk_repos() - Verify the cloning of VNFSDK source repo. +function test_clone_all_vnfsdk_repos { + clone_all_vnfsdk_repos + + asserts_file_exist $vnfsdk_src_folder/compliance/veslibrary/README + asserts_file_exist $vnfsdk_src_folder/functest/pom.xml + asserts_file_exist $vnfsdk_src_folder/lctest/pom.xml + asserts_file_exist $vnfsdk_src_folder/model/docs/index.rst + asserts_file_exist $vnfsdk_src_folder/pkgtools/pom.xml + asserts_file_exist $vnfsdk_src_folder/refrepo/pom.xml + asserts_file_exist $vnfsdk_src_folder/validation/pom.xml +} + +# test_compile_all_vnfsdk_repos () - Verify if VNFSDK source repo compiles correctly. +function test_compile_all_vnfsdk_repos { + clone_all_vnfsdk_repos + compile_all_vnfsdk_repos + + asserts_file_exist $vnfsdk_src_folder/lctest/lifecycle-test/target/lifecycle-test-service-1.0.0-SNAPSHOT.war + asserts_file_exist $vnfsdk_src_folder/pkgtools/target/vnf-sdk-pkgtools-1.0.0-SNAPSHOT.zip + asserts_file_exist $vnfsdk_src_folder/refrepo/vnfmarket-be/vnf-sdk-marketplace/target/ROOT.war + asserts_file_exist $vnfsdk_src_folder/validation/csarvalidation/target/validation-csar-1.0.0-SNAPSHOT.jar +} + +# test_get_vnfsdk_images() - Verify that the VNFSDK images are created or retrieved +function test_get_vnfsdk_images { + clone_all_vnfsdk_repos + get_vnfsdk_images + + asserts_image refrepo:1.0-STAGING-latest + asserts_image refrepo:latest +} + +# test_install_vnfsdk() - Verify that VNFSDK docker images are running. +function test_install_vnfsdk { + clone_all_vnfsdk_repos + get_vnfsdk_images + install_vnfsdk + + asserts_image_running refrepo:1.0-STAGING-latest + asserts_image refrepo:latest +} + +if [ "$1" != '*' ]; then + unset covered_functions + covered_functions=$1 +fi +main "${covered_functions[@]}" diff --git a/bootstrap/vagrant-onap/tests/test_vvp b/bootstrap/vagrant-onap/tests/test_vvp new file mode 100644 index 000000000..f77fdf4d3 --- /dev/null +++ b/bootstrap/vagrant-onap/tests/test_vvp @@ -0,0 +1,55 @@ +#!/bin/bash + +source /var/onap_tests/_test_base +source /var/onap/vvp + +covered_functions=( +"clone_all_vvp_repos" "compile_all_vvp_repos" "get_vvp_images" "install_vvp" +) + +# test_clone_all_vvp_repos() - Verify the cloning of VNFSDK source repo. +function test_clone_all_vvp_repos { + clone_all_vvp_repos + + asserts_file_exist $vvp_src_folder/cms/pom.xml + asserts_file_exist $vvp_src_folder/devkit/LICENSE.TXT + asserts_file_exist $vvp_src_folder/engagementmgr/pom.xml + asserts_file_exist $vvp_src_folder/gitlab/pom.xml + asserts_file_exist $vvp_src_folder/image-scanner/pom.xml + asserts_file_exist $vvp_src_folder/jenkins/pom.xml + asserts_file_exist $vvp_src_folder/portal/pom.xml + asserts_file_exist $vvp_src_folder/postgresql/pom.xml + asserts_file_exist $vvp_src_folder/test-engine/pom.xml + asserts_file_exist $vvp_src_folder/validation-scripts/LICENSE.txt +} + +# test_compile_all_vvp_repos () - Verify if VNFSDK source repo compiles correctly. +function test_compile_all_vvp_repos { + clone_all_vvp_repos + compile_all_vvp_repos + + # asserts_file_exist $vvp_src_folder/ +} + +# test_get_vvp_images() - Verify that the VNFSDK images are created or retrieved +function test_get_vvp_images { + clone_all_vvp_repos + get_vvp_images + + #asserts_image refrepo:latest +} + +# test_install_vvp() - Verify that VNFSDK docker images are running. +function test_install_vvp { + clone_all_vvp_repos + get_vvp_images + install_vvp + + #asserts_image_running refrepo:1.0-STAGING-latest +} + +if [ "$1" != '*' ]; then + unset covered_functions + covered_functions=$1 +fi +main "${covered_functions[@]}" |