Victor Morales | dd07480 | 2017-07-26 16:06:35 -0500 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | source /var/onap_tests/_test_base |
| 4 | source /var/onap/mso |
| 5 | |
| 6 | covered_functions=( |
Victor Morales | 6a91997 | 2017-09-28 18:29:54 -0700 | [diff] [blame] | 7 | "clone_all_mso_repos" "compile_all_mso_repos" "get_mso_images" "install_mso" |
Victor Morales | dd07480 | 2017-07-26 16:06:35 -0500 | [diff] [blame] | 8 | ) |
| 9 | |
| 10 | # test_clone_all_mso_repos() - Verify the source code retrieve of MSO project |
| 11 | function test_clone_all_mso_repos { |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame] | 12 | clone_repos "mso" |
Victor Morales | dd07480 | 2017-07-26 16:06:35 -0500 | [diff] [blame] | 13 | |
Victor Morales | 5464664 | 2017-12-08 11:57:42 -0800 | [diff] [blame^] | 14 | asserts_file_exist ${src_folders[mso]}/pom.xml |
| 15 | asserts_file_exist ${src_folders[mso]}/chef-repo/LICENSE.txt |
| 16 | asserts_file_exist ${src_folders[mso]}/docker-config/LICENSE.txt |
| 17 | asserts_file_exist ${src_folders[mso]}/libs/pom.xml |
| 18 | asserts_file_exist ${src_folders[mso]}/mso-config/LICENSE.txt |
Victor Morales | dd07480 | 2017-07-26 16:06:35 -0500 | [diff] [blame] | 19 | } |
| 20 | |
| 21 | # test_compile_all_mso_repos() - Verify the correct compilation of MSO projects |
| 22 | function test_compile_all_mso_repos { |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame] | 23 | clone_repos "mso" |
| 24 | compile_repos "mso" |
Victor Morales | dd07480 | 2017-07-26 16:06:35 -0500 | [diff] [blame] | 25 | |
Victor Morales | 5464664 | 2017-12-08 11:57:42 -0800 | [diff] [blame^] | 26 | asserts_file_exist ${src_folders[mso]}/libs/ceilometer-client/target/ceilometer-client-1.1.0-SNAPSHOT.jar |
| 27 | asserts_file_exist ${src_folders[mso]}/libs/ceilometer-model/target/ceilometer-model-1.1.0-SNAPSHOT.jar |
| 28 | asserts_file_exist ${src_folders[mso]}/libs/glance-client/target/glance-client-1.1.0-SNAPSHOT.jar |
| 29 | asserts_file_exist ${src_folders[mso]}/libs/glance-model/target/glance-model-1.1.0-SNAPSHOT.jar |
| 30 | asserts_file_exist ${src_folders[mso]}/libs/heat-client/target/heat-client-1.1.0-SNAPSHOT.jar |
| 31 | asserts_file_exist ${src_folders[mso]}/libs/heat-model/target/heat-model-1.1.0-SNAPSHOT.jar |
| 32 | asserts_file_exist ${src_folders[mso]}/libs/keystone-client/target/keystone-client-1.1.0-SNAPSHOT.jar |
| 33 | asserts_file_exist ${src_folders[mso]}/libs/keystone-model/target/keystone-model-1.1.0-SNAPSHOT.jar |
| 34 | asserts_file_exist ${src_folders[mso]}/libs/nova-client/target/nova-client-1.1.0-SNAPSHOT.jar |
| 35 | asserts_file_exist ${src_folders[mso]}/libs/nova-model/target/nova-model-1.1.0-SNAPSHOT.jar |
| 36 | asserts_file_exist ${src_folders[mso]}/libs/openstack-client/target/openstack-client-1.1.0-SNAPSHOT.jar |
| 37 | asserts_file_exist ${src_folders[mso]}/libs/quantum-client/target/quantum-client-1.1.0-SNAPSHOT.jar |
| 38 | asserts_file_exist ${src_folders[mso]}/libs/quantum-model/target/quantum-model-1.1.0-SNAPSHOT.jar |
| 39 | asserts_file_exist ${src_folders[mso]}/libs/swift-client/target/swift-client-1.1.0-SNAPSHOT.jar |
| 40 | asserts_file_exist ${src_folders[mso]}/libs/swift-model/target/swift-model-1.1.0-SNAPSHOT.jar |
Victor Morales | dd07480 | 2017-07-26 16:06:35 -0500 | [diff] [blame] | 41 | } |
| 42 | |
Victor Morales | 6a91997 | 2017-09-28 18:29:54 -0700 | [diff] [blame] | 43 | # test_get_mso_images() - Verify the creation of MSO Docker images |
| 44 | function test_get_mso_images { |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame] | 45 | clone_repos "mso" |
Victor Morales | e647162 | 2017-08-10 10:02:37 -0500 | [diff] [blame] | 46 | install_mso |
| 47 | |
| 48 | for image in mso mso-arquillian wildfly ubuntu-update jacoco; do |
| 49 | asserts_image openecomp/$image |
| 50 | done |
| 51 | } |
| 52 | |
Victor Morales | 6a91997 | 2017-09-28 18:29:54 -0700 | [diff] [blame] | 53 | # test_install_mso - Verify the execution of MSO Docker images |
| 54 | function test_install_mso { |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame] | 55 | clone_repos "mso" |
Victor Morales | e647162 | 2017-08-10 10:02:37 -0500 | [diff] [blame] | 56 | install_mso |
| 57 | install_mso_docker_config |
| 58 | |
| 59 | asserts_image_running openecomp/mso |
| 60 | asserts_image_running mariadb:10.1.11 |
| 61 | } |
Victor Morales | dd07480 | 2017-07-26 16:06:35 -0500 | [diff] [blame] | 62 | |
| 63 | if [ "$1" != '*' ]; then |
| 64 | unset covered_functions |
| 65 | covered_functions=$1 |
| 66 | fi |
| 67 | main "${covered_functions[@]}" |