diff options
author | Victor Morales <victor.morales@intel.com> | 2017-08-30 14:50:43 -0500 |
---|---|---|
committer | Victor Morales <victor.morales@intel.com> | 2017-08-30 19:17:56 -0500 |
commit | e746700a7dfe469bb65a54d04a5d2202d7f56e9e (patch) | |
tree | f20096bfb8f132d9346aaff5baa1f578fae8a639 /bootstrap/vagrant-onap/tests/test_sdc | |
parent | 2fd432a29edd1117703d464cccb9831a57109449 (diff) |
Create UTs for SDC
This change create a script that contains Unit Tests that covers
functionality of SDC component.
Change-Id: Ie51dac0fe112319da3f9522cdb36ac7de49d523d
Signed-off-by: Victor Morales <victor.morales@intel.com>
Issue-Id: INT-16
Diffstat (limited to 'bootstrap/vagrant-onap/tests/test_sdc')
-rw-r--r-- | bootstrap/vagrant-onap/tests/test_sdc | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/bootstrap/vagrant-onap/tests/test_sdc b/bootstrap/vagrant-onap/tests/test_sdc new file mode 100644 index 000000000..bb0cd7010 --- /dev/null +++ b/bootstrap/vagrant-onap/tests/test_sdc @@ -0,0 +1,69 @@ +#!/bin/bash + +source /var/onap_tests/_test_base +source /var/onap/asdc + +covered_functions=( +"clone_all_sdc_repos" "compile_all_sdc_repos" "get_sdc_images" "install_sdc" +) + +# test_clone_all_sdc_repos() - Verifies the retrieval of SDC source code repos +function test_clone_all_sdc_repos { + clone_all_sdc_repos + + asserts_file_exist $sdc_src_folder/pom.xml + asserts_file_exist $sdc_src_folder/sdc-os-chef/pom.xml + asserts_file_exist $sdc_src_folder/jtosca/pom.xml + asserts_file_exist $sdc_src_folder/sdc-distribution-client/pom.xml + asserts_file_exist $sdc_src_folder/sdc-titan-cassandra/pom.xml + asserts_file_exist $sdc_src_folder/sdc-tosca/pom.xml + asserts_file_exist $sdc_src_folder/sdc_common/pom.xml +} + +# test_compile_all_sdc_repos() - Verifies the correct compilation of SDC repositories +function test_compile_all_sdc_repos { + clone_all_sdc_repos + compile_all_sdc_repos + + asserts_file_exist $sdc_src_folder/jtosca/target/jtosca-1.1.10-SNAPSHOT.jar + asserts_file_exist $sdc_src_folder/sdc-distribution-client/sdc-distribution-ci/target/sdc-distribution-ci-1.1.32-SNAPSHOT.jar + asserts_file_exist $sdc_src_folder/sdc-distribution-client/sdc-distribution-client/target/sdc-distribution-client-1.1.32-SNAPSHOT.jar + asserts_file_exist $sdc_src_folder/sdc-os-chef/target/sdc-os-chef-1.1.0-SNAPSHOT.jar + asserts_file_exist $sdc_src_folder/sdc-titan-cassandra/target/sdc-titan-cassandra-1.0.0.jar + asserts_file_exist $sdc_src_folder/sdc-tosca/target/sdc-tosca-1.1.50-SNAPSHOT.jar + + for dirc in logging sdc-artifact-generator; do + name="openecomp-$dirc" + for module in api core; do + fullname="$name-$module" + asserts_file_exist $sdc_src_folder/sdc_common/$name-lib/$fullname/target/$fullname-1.1.0-SNAPSHOT.jar + done + done +} + +# test_get_sdc_images() - Verifies the correct retrieval of SDC Docker images +function test_get_sdc_images { + clone_all_sdc_repos + get_sdc_images + + for image in backend frontend elasticsearch kibana cassandra sanity; do + asserts_image openecomp/sdc-$image + done +} + +# test_install_sdc() - Verifies that SDC services are up and running +function test_install_sdc { + clone_all_sdc_repos + get_sdc_images + install_sdc + + for image in backend frontend elasticsearch kibana cassandra sanity; do + asserts_image_running openecomp/sdc-$image + done +} + +if [ "$1" != '*' ]; then + unset covered_functions + covered_functions=$1 +fi +main "${covered_functions[@]}" |