blob: 8392e701fe8ce69f84d87739091f87aef4adcec9 [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 Shankar0be68942017-09-14 11:10:41 -07008"get_vfc_images" "run_vfc_images" "build_nfvo_lcm_image"
9"build_gvnfm_lcm_image" "build_gvnfm_vnfmgr_image" "build_gvnfm_vnfres_image"
10"build_nfvo_lcm_image" "build_nfvo_vnfm_gvnfmadapter_image"
Victor Moralesdd074802017-07-26 16:06:35 -050011)
12
13# test_clone_all_vfc_repos() - Verify cloning and pulling source code from repositories
14function test_clone_all_vfc_repos {
Shashank Kumar Shankar6cc4a432017-09-05 13:26:19 -070015
16 # TODO(sshank): Add other asserts
17 asserts_file_exist $src_folder/nfvo/lcm/run.sh
18
Victor Moralesdd074802017-07-26 16:06:35 -050019}
20
Victor Morales94b3e972017-08-17 14:55:55 -050021# test_compile_all_vfc_repos() - Verify that all the VFC modules are compiled properly
22function test_compile_all_vfc_repos {
23 clone_all_vfc_repos
24 compile_all_vfc_repos
25
26 # TODO(electrocucaracha): Add asserts_file_exist
27}
28
Shashank Kumar Shankar6cc4a432017-09-05 13:26:19 -070029# test_get_vfc_images() - Verify all VFC images are built correctly.
30function test_get_vfc_images {
31 get_vfc_images
32
33 asserts_image nexus3.onap.org:10003/onap/vfc/nslcm
Shashank Kumar Shankar0be68942017-09-14 11:10:41 -070034 asserts_image nexus3.onap.org:10003/onap/vfc/gvnfmdriver
35 asserts_image nexus3.onap.org:10003/onap/vfc/vnfres
36 asserts_image nexus3.onap.org:10003/onap/vfc/vnfmgr
37 asserts_image nexus3.onap.org:10003/onap/vfc/vnflcm
Shashank Kumar Shankar6cc4a432017-09-05 13:26:19 -070038
Shashank Kumar Shankar0be68942017-09-14 11:10:41 -070039 # TODO(sshank): Add asserts for other VFC component docker image builds.
Shashank Kumar Shankar6cc4a432017-09-05 13:26:19 -070040}
41
Victor Morales94b3e972017-08-17 14:55:55 -050042# test_install_vfc() - Verify that the VFC are up and running
43function test_install_vfc {
44 install_vfc
45
Shashank Kumar Shankar0be68942017-09-14 11:10:41 -070046 asserts_image_running nexus3.onap.org:10003/onap/vfc/nslcm:latest
47 asserts_image_running nexus3.onap.org:10003/onap/vfc/gvnfmdriver:latest
48 asserts_image_running nexus3.onap.org:10003/onap/vfc/vnfres:latest
49 asserts_image_running nexus3.onap.org:10003/onap/vfc/vnfmgr:latest
50 asserts_image_running nexus3.onap.org:10003/onap/vfc/vnflcm:latest
Shashank Kumar Shankar6cc4a432017-09-05 13:26:19 -070051
Shashank Kumar Shankar0be68942017-09-14 11:10:41 -070052 # TODO(sshank): Add asserts for other running VFC component docker images.
Victor Morales94b3e972017-08-17 14:55:55 -050053}
54
Victor Moralesdd074802017-07-26 16:06:35 -050055if [ "$1" != '*' ]; then
56 unset covered_functions
57 covered_functions=$1
58fi
59main "${covered_functions[@]}"