blob: cd29a9733425a0e2d3f6505ae16a584e3a005f5e [file] [log] [blame]
Shashank Kumar Shankard52d0af2017-10-20 16:06:08 -07001#!/bin/bash
2
3source /var/onap_tests/_test_base
4source /var/onap/vnfsdk
5
6covered_functions=(
7"clone_all_vnfsdk_repos" "compile_all_vnfsdk_repos" "get_vnfsdk_images" "install_vnfsdk"
8)
9
10# test_clone_all_vnfsdk_repos() - Verify the cloning of VNFSDK source repo.
11function test_clone_all_vnfsdk_repos {
Victor Moralesf1f1ba52017-11-20 16:38:28 -080012 clone_repos "vnfsdk"
Shashank Kumar Shankard52d0af2017-10-20 16:06:08 -070013
Victor Morales54646642017-12-08 11:57:42 -080014 asserts_file_exist ${src_folders[vnfsdk]}/compliance/veslibrary/README
15 asserts_file_exist ${src_folders[vnfsdk]}/functest/pom.xml
16 asserts_file_exist ${src_folders[vnfsdk]}/lctest/pom.xml
17 asserts_file_exist ${src_folders[vnfsdk]}/model/docs/index.rst
18 asserts_file_exist ${src_folders[vnfsdk]}/pkgtools/pom.xml
19 asserts_file_exist ${src_folders[vnfsdk]}/refrepo/pom.xml
20 asserts_file_exist ${src_folders[vnfsdk]}/validation/pom.xml
Shashank Kumar Shankard52d0af2017-10-20 16:06:08 -070021}
22
23# test_compile_all_vnfsdk_repos () - Verify if VNFSDK source repo compiles correctly.
24function test_compile_all_vnfsdk_repos {
Victor Moralesf1f1ba52017-11-20 16:38:28 -080025 clone_repos "vnfsdk"
26 compile_repos "vnfsdk"
Victor Morales6d280a12017-10-23 11:56:43 -070027
Victor Morales54646642017-12-08 11:57:42 -080028 asserts_file_exist ${src_folders[vnfsdk]}/lctest/lifecycle-test/target/lifecycle-test-service-1.0.0-SNAPSHOT.war
29 asserts_file_exist ${src_folders[vnfsdk]}/pkgtools/target/vnf-sdk-pkgtools-1.0.0-SNAPSHOT.zip
30 asserts_file_exist ${src_folders[vnfsdk]}/refrepo/vnfmarket-be/vnf-sdk-marketplace/target/ROOT.war
31 asserts_file_exist ${src_folders[vnfsdk]}/validation/csarvalidation/target/validation-csar-1.0.0-SNAPSHOT.jar
Shashank Kumar Shankard52d0af2017-10-20 16:06:08 -070032}
33
34# test_get_vnfsdk_images() - Verify that the VNFSDK images are created or retrieved
Victor Morales6d280a12017-10-23 11:56:43 -070035function test_get_vnfsdk_images {
Victor Moralesf1f1ba52017-11-20 16:38:28 -080036 clone_repos "vnfsdk"
Shashank Kumar Shankard52d0af2017-10-20 16:06:08 -070037 get_vnfsdk_images
38
39 asserts_image refrepo:1.0-STAGING-latest
40 asserts_image refrepo:latest
41}
42
43# test_install_vnfsdk() - Verify that VNFSDK docker images are running.
44function test_install_vnfsdk {
Victor Moralesf1f1ba52017-11-20 16:38:28 -080045 clone_repos "vnfsdk"
Shashank Kumar Shankard52d0af2017-10-20 16:06:08 -070046 get_vnfsdk_images
47 install_vnfsdk
48
49 asserts_image_running refrepo:1.0-STAGING-latest
50 asserts_image refrepo:latest
51}
52
53if [ "$1" != '*' ]; then
54 unset covered_functions
55 covered_functions=$1
56fi
Victor Morales6d280a12017-10-23 11:56:43 -070057main "${covered_functions[@]}"