blob: e948ccedbcbc04307919c51bc6f212913f5ea9df [file] [log] [blame]
Victor Moralesdd074802017-07-26 16:06:35 -05001#!/bin/bash
2
3source /var/onap_tests/_test_base
4source /var/onap/vfc
5
6covered_functions=(
Victor Morales94b3e972017-08-17 14:55:55 -05007"clone_all_vfc_repos" "compile_all_vfc_repos" "install_vfc"
Shashank Kumar Shankar6cc4a432017-09-05 13:26:19 -07008"build_nfvo_lcm_image" "get_vfc_images" "run_vfc_images"
Victor Moralesdd074802017-07-26 16:06:35 -05009)
10
11# test_clone_all_vfc_repos() - Verify cloning and pulling source code from repositories
12function test_clone_all_vfc_repos {
Shashank Kumar Shankar6cc4a432017-09-05 13:26:19 -070013
14 # TODO(sshank): Add other asserts
15 asserts_file_exist $src_folder/nfvo/lcm/run.sh
16
Victor Moralesdd074802017-07-26 16:06:35 -050017}
18
Victor Morales94b3e972017-08-17 14:55:55 -050019# test_compile_all_vfc_repos() - Verify that all the VFC modules are compiled properly
20function test_compile_all_vfc_repos {
21 clone_all_vfc_repos
22 compile_all_vfc_repos
23
24 # TODO(electrocucaracha): Add asserts_file_exist
25}
26
Shashank Kumar Shankar6cc4a432017-09-05 13:26:19 -070027# test_get_vfc_images() - Verify all VFC images are built correctly.
28function test_get_vfc_images {
29 get_vfc_images
30
31 asserts_image nexus3.onap.org:10003/onap/vfc/nslcm
32
33 # TODO(sshank): Add asserts for other VFC component docker image builds when they are ready.
34}
35
Victor Morales94b3e972017-08-17 14:55:55 -050036# test_install_vfc() - Verify that the VFC are up and running
37function test_install_vfc {
38 install_vfc
39
Shashank Kumar Shankar6cc4a432017-09-05 13:26:19 -070040 asserts_image_running vfc-nslcm
41
42 # TODO(sshank): Add asserts for other running VFC component docker images when they are ready.
Victor Morales94b3e972017-08-17 14:55:55 -050043}
44
Victor Moralesdd074802017-07-26 16:06:35 -050045if [ "$1" != '*' ]; then
46 unset covered_functions
47 covered_functions=$1
48fi
49main "${covered_functions[@]}"