blob: 250a9fcc576413163f1b074ed293a108318e39c0 [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 {
12 clone_all_vnfsdk_repos
13
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 {
25 clone_all_vnfsdk_repos
Victor Morales6d280a12017-10-23 11:56:43 -070026 compile_all_vnfsdk_repos
27
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 {
Shashank Kumar Shankard52d0af2017-10-20 16:06:08 -070036 clone_all_vnfsdk_repos
37 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 {
45 clone_all_vnfsdk_repos
46 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[@]}"