blob: 6f37904a141de2e50b8790f0a75f4c49aee7d043 [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 Morales6d280a12017-10-23 11:56:43 -070014 asserts_file_exist $vnfsdk_src_folder/compliance/veslibrary/README
15 asserts_file_exist $vnfsdk_src_folder/functest/pom.xml
16 asserts_file_exist $vnfsdk_src_folder/lctest/pom.xml
17 asserts_file_exist $vnfsdk_src_folder/model/docs/index.rst
18 asserts_file_exist $vnfsdk_src_folder/pkgtools/pom.xml
Shashank Kumar Shankard52d0af2017-10-20 16:06:08 -070019 asserts_file_exist $vnfsdk_src_folder/refrepo/pom.xml
Victor Morales6d280a12017-10-23 11:56:43 -070020 asserts_file_exist $vnfsdk_src_folder/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
28 asserts_file_exist $vnfsdk_src_folder/lctest/lifecycle-test/target/lifecycle-test-service-1.0.0-SNAPSHOT.war
29 asserts_file_exist $vnfsdk_src_folder/pkgtools/target/vnf-sdk-pkgtools-1.0.0-SNAPSHOT.zip
30 asserts_file_exist $vnfsdk_src_folder/refrepo/vnfmarket-be/vnf-sdk-marketplace/target/ROOT.war
31 asserts_file_exist $vnfsdk_src_folder/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[@]}"