Victor Morales | e746700 | 2017-08-30 14:50:43 -0500 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | source /var/onap_tests/_test_base |
Victor Morales | dbe2e0b | 2017-09-20 09:55:45 -0700 | [diff] [blame] | 4 | source /var/onap/sdc |
Victor Morales | e746700 | 2017-08-30 14:50:43 -0500 | [diff] [blame] | 5 | |
| 6 | covered_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 |
| 11 | function test_clone_all_sdc_repos { |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame] | 12 | clone_repos "sdc" |
Victor Morales | e746700 | 2017-08-30 14:50:43 -0500 | [diff] [blame] | 13 | |
Victor Morales | 5464664 | 2017-12-08 11:57:42 -0800 | [diff] [blame^] | 14 | asserts_file_exist ${src_folders[sdc]}/pom.xml |
| 15 | asserts_file_exist ${src_folders[sdc]}/sdc-os-chef/pom.xml |
| 16 | asserts_file_exist ${src_folders[sdc]}/jtosca/pom.xml |
| 17 | asserts_file_exist ${src_folders[sdc]}/sdc-distribution-client/pom.xml |
| 18 | asserts_file_exist ${src_folders[sdc]}/sdc-titan-cassandra/pom.xml |
| 19 | asserts_file_exist ${src_folders[sdc]}/sdc-tosca/pom.xml |
| 20 | asserts_file_exist ${src_folders[sdc]}/sdc_common/pom.xml |
Victor Morales | e746700 | 2017-08-30 14:50:43 -0500 | [diff] [blame] | 21 | } |
| 22 | |
| 23 | # test_compile_all_sdc_repos() - Verifies the correct compilation of SDC repositories |
| 24 | function test_compile_all_sdc_repos { |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame] | 25 | clone_repos "sdc" |
| 26 | compile_repos "sdc" |
Victor Morales | e746700 | 2017-08-30 14:50:43 -0500 | [diff] [blame] | 27 | |
Victor Morales | 5464664 | 2017-12-08 11:57:42 -0800 | [diff] [blame^] | 28 | #asserts_file_exist ${src_folders[sdc]}/jtosca/target/jtosca-1.1.10-SNAPSHOT.jar |
| 29 | #asserts_file_exist ${src_folders[sdc]}/sdc-distribution-client/sdc-distribution-ci/target/sdc-distribution-ci-1.1.*-SNAPSHOT.jar |
| 30 | #asserts_file_exist ${src_folders[sdc]}/sdc-distribution-client/sdc-distribution-client/target/sdc-distribution-client-1.1.*-SNAPSHOT.jar |
| 31 | #asserts_file_exist ${src_folders[sdc]}/sdc-titan-cassandra/target/jamm-0.3.0.jar |
| 32 | #asserts_file_exist ${src_folders[sdc]}/sdc-tosca/target/sdc-tosca-1.1.*-SNAPSHOT.jar |
Victor Morales | e746700 | 2017-08-30 14:50:43 -0500 | [diff] [blame] | 33 | |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame] | 34 | #for dirc in logging sdc-artifact-generator; do |
| 35 | for dirc in logging; do |
Victor Morales | e746700 | 2017-08-30 14:50:43 -0500 | [diff] [blame] | 36 | name="openecomp-$dirc" |
| 37 | for module in api core; do |
| 38 | fullname="$name-$module" |
Victor Morales | 5464664 | 2017-12-08 11:57:42 -0800 | [diff] [blame^] | 39 | asserts_file_exist ${src_folders[sdc]}/sdc_common/$name-lib/$fullname/target/$fullname-1.1.0-SNAPSHOT.jar |
Victor Morales | e746700 | 2017-08-30 14:50:43 -0500 | [diff] [blame] | 40 | done |
| 41 | done |
| 42 | } |
| 43 | |
| 44 | # test_get_sdc_images() - Verifies the correct retrieval of SDC Docker images |
| 45 | function test_get_sdc_images { |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame] | 46 | clone_repos "sdc" |
Victor Morales | e746700 | 2017-08-30 14:50:43 -0500 | [diff] [blame] | 47 | get_sdc_images |
| 48 | |
Victor Morales | dbe2e0b | 2017-09-20 09:55:45 -0700 | [diff] [blame] | 49 | for image in sanity elasticsearch cassandra kibana frontend backend; do |
| 50 | asserts_image openecomp/base_sdc-$image |
Victor Morales | e746700 | 2017-08-30 14:50:43 -0500 | [diff] [blame] | 51 | done |
| 52 | } |
| 53 | |
| 54 | # test_install_sdc() - Verifies that SDC services are up and running |
| 55 | function test_install_sdc { |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame] | 56 | clone_repos "sdc" |
Victor Morales | e746700 | 2017-08-30 14:50:43 -0500 | [diff] [blame] | 57 | get_sdc_images |
| 58 | install_sdc |
| 59 | |
Victor Morales | dbe2e0b | 2017-09-20 09:55:45 -0700 | [diff] [blame] | 60 | for image in elasticsearch cassandra kibana frontend backend; do |
| 61 | asserts_image_running openecomp/base_sdc-$image |
Victor Morales | e746700 | 2017-08-30 14:50:43 -0500 | [diff] [blame] | 62 | done |
| 63 | } |
| 64 | |
| 65 | if [ "$1" != '*' ]; then |
| 66 | unset covered_functions |
| 67 | covered_functions=$1 |
| 68 | fi |
| 69 | main "${covered_functions[@]}" |