blob: 9b6f5a5a589ae0348480a6fda7cba1d0a8ebbcb1 [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 {
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
Victor Moralesdbe2e0b2017-09-20 09:55:45 -070029 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
34 for dirc in logging sdc-artifact-generator; do
35 name="openecomp-$dirc"
36 for module in api core; do
37 fullname="$name-$module"
38 asserts_file_exist $sdc_src_folder/sdc_common/$name-lib/$fullname/target/$fullname-1.1.0-SNAPSHOT.jar
39 done
40 done
41}
42
43# test_get_sdc_images() - Verifies the correct retrieval of SDC Docker images
44function test_get_sdc_images {
45 clone_all_sdc_repos
46 get_sdc_images
47
Victor Moralesdbe2e0b2017-09-20 09:55:45 -070048 for image in sanity elasticsearch cassandra kibana frontend backend; do
49 asserts_image openecomp/base_sdc-$image
Victor Moralese7467002017-08-30 14:50:43 -050050 done
51}
52
53# test_install_sdc() - Verifies that SDC services are up and running
54function test_install_sdc {
55 clone_all_sdc_repos
56 get_sdc_images
57 install_sdc
58
Victor Moralesdbe2e0b2017-09-20 09:55:45 -070059 for image in elasticsearch cassandra kibana frontend backend; do
60 asserts_image_running openecomp/base_sdc-$image
Victor Moralese7467002017-08-30 14:50:43 -050061 done
62}
63
64if [ "$1" != '*' ]; then
65 unset covered_functions
66 covered_functions=$1
67fi
68main "${covered_functions[@]}"