blob: cb7b014dc890b7ae4b6470bc5f365f04fae1caac [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 Moralese6471622017-08-10 10:02:37 -05007"clone_all_mso_repos" "compile_all_mso_repos" "install_mso" "install_mso_docker_config"
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 {
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
22function 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 Moralese6471622017-08-10 10:02:37 -050043# test_install_mso() - Verify the creation of MSO Docker images
44function 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
54function 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 Moralesdd074802017-07-26 16:06:35 -050062
63if [ "$1" != '*' ]; then
64 unset covered_functions
65 covered_functions=$1
66fi
67main "${covered_functions[@]}"