blob: bb0cd7010cff8aa4b54e1b5e2dee0fb84d8ef494 [file] [log] [blame]
Victor Moralese7467002017-08-30 14:50:43 -05001#!/bin/bash
2
3source /var/onap_tests/_test_base
4source /var/onap/asdc
5
6covered_functions=(
7"clone_all_sdc_repos" "compile_all_sdc_repos" "get_sdc_images" "install_sdc"
8)
9
10# test_clone_all_sdc_repos() - Verifies the retrieval of SDC source code repos
11function test_clone_all_sdc_repos {
12 clone_all_sdc_repos
13
14 asserts_file_exist $sdc_src_folder/pom.xml
15 asserts_file_exist $sdc_src_folder/sdc-os-chef/pom.xml
16 asserts_file_exist $sdc_src_folder/jtosca/pom.xml
17 asserts_file_exist $sdc_src_folder/sdc-distribution-client/pom.xml
18 asserts_file_exist $sdc_src_folder/sdc-titan-cassandra/pom.xml
19 asserts_file_exist $sdc_src_folder/sdc-tosca/pom.xml
20 asserts_file_exist $sdc_src_folder/sdc_common/pom.xml
21}
22
23# test_compile_all_sdc_repos() - Verifies the correct compilation of SDC repositories
24function test_compile_all_sdc_repos {
25 clone_all_sdc_repos
26 compile_all_sdc_repos
27
28 asserts_file_exist $sdc_src_folder/jtosca/target/jtosca-1.1.10-SNAPSHOT.jar
29 asserts_file_exist $sdc_src_folder/sdc-distribution-client/sdc-distribution-ci/target/sdc-distribution-ci-1.1.32-SNAPSHOT.jar
30 asserts_file_exist $sdc_src_folder/sdc-distribution-client/sdc-distribution-client/target/sdc-distribution-client-1.1.32-SNAPSHOT.jar
31 asserts_file_exist $sdc_src_folder/sdc-os-chef/target/sdc-os-chef-1.1.0-SNAPSHOT.jar
32 asserts_file_exist $sdc_src_folder/sdc-titan-cassandra/target/sdc-titan-cassandra-1.0.0.jar
33 asserts_file_exist $sdc_src_folder/sdc-tosca/target/sdc-tosca-1.1.50-SNAPSHOT.jar
34
35 for dirc in logging sdc-artifact-generator; do
36 name="openecomp-$dirc"
37 for module in api core; do
38 fullname="$name-$module"
39 asserts_file_exist $sdc_src_folder/sdc_common/$name-lib/$fullname/target/$fullname-1.1.0-SNAPSHOT.jar
40 done
41 done
42}
43
44# test_get_sdc_images() - Verifies the correct retrieval of SDC Docker images
45function test_get_sdc_images {
46 clone_all_sdc_repos
47 get_sdc_images
48
49 for image in backend frontend elasticsearch kibana cassandra sanity; do
50 asserts_image openecomp/sdc-$image
51 done
52}
53
54# test_install_sdc() - Verifies that SDC services are up and running
55function test_install_sdc {
56 clone_all_sdc_repos
57 get_sdc_images
58 install_sdc
59
60 for image in backend frontend elasticsearch kibana cassandra sanity; do
61 asserts_image_running openecomp/sdc-$image
62 done
63}
64
65if [ "$1" != '*' ]; then
66 unset covered_functions
67 covered_functions=$1
68fi
69main "${covered_functions[@]}"