blob: 5aeca45c20208f4448beb2bae90c20bd5e99a3fe [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
14 asserts_file_exist $vnfsdk_src_folder/refrepo/pom.xml
15}
16
17# test_compile_all_vnfsdk_repos () - Verify if VNFSDK source repo compiles correctly.
18function test_compile_all_vnfsdk_repos {
19 clone_all_vnfsdk_repos
20 {
21 compile_all_vnfsdk_repos
22 } || {
23 set -e
24 }
25}
26
27# test_get_vnfsdk_images() - Verify that the VNFSDK images are created or retrieved
28function test_get_vnfsdk_images {
29 clone_all_vnfsdk_repos
30 get_vnfsdk_images
31
32 asserts_image refrepo:1.0-STAGING-latest
33 asserts_image refrepo:latest
34}
35
36# test_install_vnfsdk() - Verify that VNFSDK docker images are running.
37function test_install_vnfsdk {
38 clone_all_vnfsdk_repos
39 get_vnfsdk_images
40 install_vnfsdk
41
42 asserts_image_running refrepo:1.0-STAGING-latest
43 asserts_image refrepo:latest
44}
45
46if [ "$1" != '*' ]; then
47 unset covered_functions
48 covered_functions=$1
49fi
50main "${covered_functions[@]}"