blob: 1b5b85de6718ed59aef7f99ed0329f963d5f7ba4 [file] [log] [blame]
Victor Morales000de532017-08-31 17:28:10 -05001#!/bin/bash
2
3source /var/onap_tests/_test_base
4source /var/onap/multicloud
5
6covered_functions=(
Victor Morales6a919972017-09-28 18:29:54 -07007"clone_multicloud_repos" "compile_multicloud_repos" "get_multicloud_images" "install_multicloud"
Victor Morales000de532017-08-31 17:28:10 -05008)
9
10# test_clone_multicloud_repos() - Verify that Multi Cloud repositories are cloned properly
11function test_clone_multicloud_repos {
Victor Moralesf1f1ba52017-11-20 16:38:28 -080012 clone_repos "multicloud"
Victor Morales000de532017-08-31 17:28:10 -050013
Victor Morales54646642017-12-08 11:57:42 -080014 #asserts_file_exist ${src_folders[multicloud]}/
15 asserts_file_exist ${src_folders[multicloud]}/framework/pom.xml
16 asserts_file_exist ${src_folders[multicloud]}/openstack/pom.xml
17 asserts_file_exist ${src_folders[multicloud]}/openstack/vmware/pom.xml
18 asserts_file_exist ${src_folders[multicloud]}/openstack/windriver/pom.xml
19 #asserts_file_exist ${src_folders[multicloud]}/azure/
Victor Morales000de532017-08-31 17:28:10 -050020}
21
22# test_compile_multicloud_repos() -
23function test_compile_multicloud_repos {
Victor Moralesf1f1ba52017-11-20 16:38:28 -080024 clone_repos "multicloud"
25 compile_repos "multicloud"
Victor Morales000de532017-08-31 17:28:10 -050026
Victor Morales54646642017-12-08 11:57:42 -080027 asserts_file_exist ${src_folders[multicloud]}/openstack/newton/target/multicloud-openstack-newton-1.0.0-SNAPSHOT.zip
28 asserts_file_exist ${src_folders[multicloud]}/openstack/ocata/target/multicloud-openstack-ocata-1.0.0-SNAPSHOT.zip
29 asserts_file_exist ${src_folders[multicloud]}/openstack/windriver/target/multicloud-openstack-windriver-1.0.0-SNAPSHOT.zip
Victor Morales000de532017-08-31 17:28:10 -050030}
31
Victor Morales6a919972017-09-28 18:29:54 -070032# test_get_multicloud_images() -
33function test_get_multicloud_images {
Victor Moralesf1f1ba52017-11-20 16:38:28 -080034 clone_repos "multicloud"
Victor Morales6a919972017-09-28 18:29:54 -070035 get_multicloud_images
Victor Morales88d193e2017-11-16 10:50:28 -080036
37 asserts_image onap/multicloud/openstack-$openstack_release
Victor Morales6a919972017-09-28 18:29:54 -070038}
39
Victor Morales000de532017-08-31 17:28:10 -050040# test_install_multicloud() - Verify the built and start of Multi Cloud services
41function test_install_multicloud {
Victor Moralesf1f1ba52017-11-20 16:38:28 -080042 clone_repos "multicloud"
Victor Morales6a919972017-09-28 18:29:54 -070043 get_multicloud_images
Victor Morales000de532017-08-31 17:28:10 -050044 install_multicloud
Victor Morales88d193e2017-11-16 10:50:28 -080045
46 # NOTE(electrocucaracha): Depends on https://gerrit.onap.org/r/#/c/23631/
47 asserts_http_status_code http://127.0.0.1:9003/api/multicloud-$openstack_release/v0/swagger.json
Victor Morales000de532017-08-31 17:28:10 -050048}
49
50if [ "$1" != '*' ]; then
51 unset covered_functions
52 covered_functions=$1
53fi
54main "${covered_functions[@]}"