blob: 6d5470e808a1f382a3a8a09a87a813af71817abb [file] [log] [blame]
Victor Moralese7467002017-08-30 14:50:43 -05001#!/bin/bash
2
3source /var/onap_tests/_test_base
Victor Moralesdbe2e0b2017-09-20 09:55:45 -07004source /var/onap/sdc
Victor Moralese7467002017-08-30 14:50:43 -05005
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 {
Victor Moralesf1f1ba52017-11-20 16:38:28 -080012 clone_repos "sdc"
Victor Moralese7467002017-08-30 14:50:43 -050013
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 {
Victor Moralesf1f1ba52017-11-20 16:38:28 -080025 clone_repos "sdc"
26 compile_repos "sdc"
Victor Moralese7467002017-08-30 14:50:43 -050027
Victor Moralesf1f1ba52017-11-20 16:38:28 -080028 #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.*-SNAPSHOT.jar
30 #asserts_file_exist $sdc_src_folder/sdc-distribution-client/sdc-distribution-client/target/sdc-distribution-client-1.1.*-SNAPSHOT.jar
31 #asserts_file_exist $sdc_src_folder/sdc-titan-cassandra/target/jamm-0.3.0.jar
32 #asserts_file_exist $sdc_src_folder/sdc-tosca/target/sdc-tosca-1.1.*-SNAPSHOT.jar
Victor Moralese7467002017-08-30 14:50:43 -050033
Victor Moralesf1f1ba52017-11-20 16:38:28 -080034 #for dirc in logging sdc-artifact-generator; do
35 for dirc in logging; do
Victor Moralese7467002017-08-30 14:50:43 -050036 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 {
Victor Moralesf1f1ba52017-11-20 16:38:28 -080046 clone_repos "sdc"
Victor Moralese7467002017-08-30 14:50:43 -050047 get_sdc_images
48
Victor Moralesdbe2e0b2017-09-20 09:55:45 -070049 for image in sanity elasticsearch cassandra kibana frontend backend; do
50 asserts_image openecomp/base_sdc-$image
Victor Moralese7467002017-08-30 14:50:43 -050051 done
52}
53
54# test_install_sdc() - Verifies that SDC services are up and running
55function test_install_sdc {
Victor Moralesf1f1ba52017-11-20 16:38:28 -080056 clone_repos "sdc"
Victor Moralese7467002017-08-30 14:50:43 -050057 get_sdc_images
58 install_sdc
59
Victor Moralesdbe2e0b2017-09-20 09:55:45 -070060 for image in elasticsearch cassandra kibana frontend backend; do
61 asserts_image_running openecomp/base_sdc-$image
Victor Moralese7467002017-08-30 14:50:43 -050062 done
63}
64
65if [ "$1" != '*' ]; then
66 unset covered_functions
67 covered_functions=$1
68fi
69main "${covered_functions[@]}"