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 | e647162 | 2017-08-10 10:02:37 -0500 | [diff] [blame] | 7 | "clone_all_mso_repos" "compile_all_mso_repos" "install_mso" "install_mso_docker_config" |
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 { |
| 12 | clone_all_mso_repos |
| 13 | |
| 14 | asserts_file_exist $src_folder/pom.xml |
| 15 | asserts_file_exist $src_folder/chef-repo/LICENSE.txt |
| 16 | asserts_file_exist $src_folder/docker-config/LICENSE.txt |
| 17 | asserts_file_exist $src_folder/libs/pom.xml |
| 18 | asserts_file_exist $src_folder/mso-config/LICENSE.txt |
| 19 | } |
| 20 | |
| 21 | # test_compile_all_mso_repos() - Verify the correct compilation of MSO projects |
| 22 | function test_compile_all_mso_repos { |
| 23 | clone_all_mso_repos |
| 24 | compile_all_mso_repos |
| 25 | |
| 26 | asserts_file_exist $src_folder/libs/ceilometer-client/target/ceilometer-client-1.1.0-SNAPSHOT.jar |
| 27 | asserts_file_exist $src_folder/libs/ceilometer-model/target/ceilometer-model-1.1.0-SNAPSHOT.jar |
| 28 | asserts_file_exist $src_folder/libs/glance-client/target/glance-client-1.1.0-SNAPSHOT.jar |
| 29 | asserts_file_exist $src_folder/libs/glance-model/target/glance-model-1.1.0-SNAPSHOT.jar |
| 30 | asserts_file_exist $src_folder/libs/heat-client/target/heat-client-1.1.0-SNAPSHOT.jar |
| 31 | asserts_file_exist $src_folder/libs/heat-model/target/heat-model-1.1.0-SNAPSHOT.jar |
| 32 | asserts_file_exist $src_folder/libs/keystone-client/target/keystone-client-1.1.0-SNAPSHOT.jar |
| 33 | asserts_file_exist $src_folder/libs/keystone-model/target/keystone-model-1.1.0-SNAPSHOT.jar |
| 34 | asserts_file_exist $src_folder/libs/nova-client/target/nova-client-1.1.0-SNAPSHOT.jar |
| 35 | asserts_file_exist $src_folder/libs/nova-model/target/nova-model-1.1.0-SNAPSHOT.jar |
| 36 | asserts_file_exist $src_folder/libs/openstack-client/target/openstack-client-1.1.0-SNAPSHOT.jar |
| 37 | asserts_file_exist $src_folder/libs/quantum-client/target/quantum-client-1.1.0-SNAPSHOT.jar |
| 38 | asserts_file_exist $src_folder/libs/quantum-model/target/quantum-model-1.1.0-SNAPSHOT.jar |
| 39 | asserts_file_exist $src_folder/libs/swift-client/target/swift-client-1.1.0-SNAPSHOT.jar |
| 40 | asserts_file_exist $src_folder/libs/swift-model/target/swift-model-1.1.0-SNAPSHOT.jar |
| 41 | } |
| 42 | |
Victor Morales | e647162 | 2017-08-10 10:02:37 -0500 | [diff] [blame] | 43 | # test_install_mso() - Verify the creation of MSO Docker images |
| 44 | function test_install_mso { |
| 45 | clone_all_mso_repos |
| 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 | |
| 53 | # test_install_mso_docker_config - Verify the execution of MSO Docker images |
| 54 | function test_install_mso_docker_config { |
| 55 | clone_all_mso_repos |
| 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[@]}" |