Victor Morales | 000de53 | 2017-08-31 17:28:10 -0500 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | source /var/onap_tests/_test_base |
| 4 | source /var/onap/multicloud |
| 5 | |
| 6 | covered_functions=( |
Victor Morales | 6a91997 | 2017-09-28 18:29:54 -0700 | [diff] [blame] | 7 | "clone_multicloud_repos" "compile_multicloud_repos" "get_multicloud_images" "install_multicloud" |
Victor Morales | 000de53 | 2017-08-31 17:28:10 -0500 | [diff] [blame] | 8 | ) |
| 9 | |
| 10 | # test_clone_multicloud_repos() - Verify that Multi Cloud repositories are cloned properly |
| 11 | function test_clone_multicloud_repos { |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame] | 12 | clone_repos "multicloud" |
Victor Morales | 000de53 | 2017-08-31 17:28:10 -0500 | [diff] [blame] | 13 | |
Victor Morales | 5464664 | 2017-12-08 11:57:42 -0800 | [diff] [blame^] | 14 | #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 Morales | 000de53 | 2017-08-31 17:28:10 -0500 | [diff] [blame] | 20 | } |
| 21 | |
| 22 | # test_compile_multicloud_repos() - |
| 23 | function test_compile_multicloud_repos { |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame] | 24 | clone_repos "multicloud" |
| 25 | compile_repos "multicloud" |
Victor Morales | 000de53 | 2017-08-31 17:28:10 -0500 | [diff] [blame] | 26 | |
Victor Morales | 5464664 | 2017-12-08 11:57:42 -0800 | [diff] [blame^] | 27 | 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 Morales | 000de53 | 2017-08-31 17:28:10 -0500 | [diff] [blame] | 30 | } |
| 31 | |
Victor Morales | 6a91997 | 2017-09-28 18:29:54 -0700 | [diff] [blame] | 32 | # test_get_multicloud_images() - |
| 33 | function test_get_multicloud_images { |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame] | 34 | clone_repos "multicloud" |
Victor Morales | 6a91997 | 2017-09-28 18:29:54 -0700 | [diff] [blame] | 35 | get_multicloud_images |
Victor Morales | 88d193e | 2017-11-16 10:50:28 -0800 | [diff] [blame] | 36 | |
| 37 | asserts_image onap/multicloud/openstack-$openstack_release |
Victor Morales | 6a91997 | 2017-09-28 18:29:54 -0700 | [diff] [blame] | 38 | } |
| 39 | |
Victor Morales | 000de53 | 2017-08-31 17:28:10 -0500 | [diff] [blame] | 40 | # test_install_multicloud() - Verify the built and start of Multi Cloud services |
| 41 | function test_install_multicloud { |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame] | 42 | clone_repos "multicloud" |
Victor Morales | 6a91997 | 2017-09-28 18:29:54 -0700 | [diff] [blame] | 43 | get_multicloud_images |
Victor Morales | 000de53 | 2017-08-31 17:28:10 -0500 | [diff] [blame] | 44 | install_multicloud |
Victor Morales | 88d193e | 2017-11-16 10:50:28 -0800 | [diff] [blame] | 45 | |
| 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 Morales | 000de53 | 2017-08-31 17:28:10 -0500 | [diff] [blame] | 48 | } |
| 49 | |
| 50 | if [ "$1" != '*' ]; then |
| 51 | unset covered_functions |
| 52 | covered_functions=$1 |
| 53 | fi |
| 54 | main "${covered_functions[@]}" |