blob: 6a6bef772caf445746a06d158fe7410a45199e3e [file] [log] [blame]
Victor Moralesdd074802017-07-26 16:06:35 -05001#!/bin/bash
2
3source /var/onap_tests/_test_base
4source /var/onap/mso
5
6covered_functions=(
Victor Morales6a919972017-09-28 18:29:54 -07007"clone_all_mso_repos" "compile_all_mso_repos" "get_mso_images" "install_mso"
Victor Moralesdd074802017-07-26 16:06:35 -05008)
9
10# test_clone_all_mso_repos() - Verify the source code retrieve of MSO project
11function test_clone_all_mso_repos {
Victor Moralesf1f1ba52017-11-20 16:38:28 -080012 clone_repos "mso"
Victor Moralesdd074802017-07-26 16:06:35 -050013
Victor Morales54646642017-12-08 11:57:42 -080014 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 Moralesdd074802017-07-26 16:06:35 -050019}
20
21# test_compile_all_mso_repos() - Verify the correct compilation of MSO projects
22function test_compile_all_mso_repos {
Victor Moralesf1f1ba52017-11-20 16:38:28 -080023 clone_repos "mso"
24 compile_repos "mso"
Victor Moralesdd074802017-07-26 16:06:35 -050025
Victor Morales54646642017-12-08 11:57:42 -080026 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 Moralesdd074802017-07-26 16:06:35 -050041}
42
Victor Morales6a919972017-09-28 18:29:54 -070043# test_get_mso_images() - Verify the creation of MSO Docker images
44function test_get_mso_images {
Victor Moralesf1f1ba52017-11-20 16:38:28 -080045 clone_repos "mso"
Victor Moralese6471622017-08-10 10:02:37 -050046 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 Morales6a919972017-09-28 18:29:54 -070053# test_install_mso - Verify the execution of MSO Docker images
54function test_install_mso {
Victor Moralesf1f1ba52017-11-20 16:38:28 -080055 clone_repos "mso"
Victor Moralese6471622017-08-10 10:02:37 -050056 install_mso
57 install_mso_docker_config
58
59 asserts_image_running openecomp/mso
60 asserts_image_running mariadb:10.1.11
61}
Victor Moralesdd074802017-07-26 16:06:35 -050062
63if [ "$1" != '*' ]; then
64 unset covered_functions
65 covered_functions=$1
66fi
67main "${covered_functions[@]}"