aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap/vagrant-onap/tests/test_msb
diff options
context:
space:
mode:
authorVictor Morales <victor.morales@intel.com>2017-12-01 17:52:07 -0800
committerVictor Morales <victor.morales@intel.com>2017-12-01 17:52:07 -0800
commit9d205bc0a4ec67b6b97cd5f6de07eba8eb835fd9 (patch)
treeccd7a56a9bbf6e0f80d1e360d977ef022f181886 /bootstrap/vagrant-onap/tests/test_msb
parente62aae6b5d079c5175441686d49364b71741f6d9 (diff)
Add MSB support
The Microservices Bus project has been supported by this change Change-Id: Id86a0a300b2622ee4b0d362c798c9656cb41fa33 Signed-off-by: Victor Morales <victor.morales@intel.com> Issue-ID: INT-358
Diffstat (limited to 'bootstrap/vagrant-onap/tests/test_msb')
-rwxr-xr-xbootstrap/vagrant-onap/tests/test_msb61
1 files changed, 61 insertions, 0 deletions
diff --git a/bootstrap/vagrant-onap/tests/test_msb b/bootstrap/vagrant-onap/tests/test_msb
new file mode 100755
index 000000000..d8784ce7b
--- /dev/null
+++ b/bootstrap/vagrant-onap/tests/test_msb
@@ -0,0 +1,61 @@
+#!/bin/bash
+
+source /var/onap_tests/_test_base
+source /var/onap/msb
+
+covered_functions=(
+"clone_all_msb_repos" "compile_all_msb_repos" "get_msb_images" "install_msb"
+)
+
+# test_clone_all_msb_repos() - Verify the source code retrieve of Microservice Bus project
+function test_clone_all_msb_repos {
+ clone_repos "msb"
+
+ asserts_file_exist $msb_src_folder/apigateway/pom.xml
+ asserts_file_exist $msb_src_folder/discovery/pom.xml
+ asserts_file_exist $msb_src_folder/java-sdk/pom.xml
+ asserts_file_exist $msb_src_folder/swagger-sdk/pom.xml
+}
+
+# test_compile_all_msb_repos() - Verify the correct compilation of MSB project
+function test_compile_all_msb_repos {
+ clone_repos "msb"
+ compile_repos "msb"
+
+ asserts_file_exist $msb_src_folder/apigateway/apiroute/apiroute-service/target/original-apiroute-service-1.1.0-SNAPSHOT.jar
+ asserts_file_exist $msb_src_folder/apigateway/apiroute/apiroute-standalone/target/apiroute-1.1.0-SNAPSHOT.zip
+ asserts_file_exist $msb_src_folder/discovery/discovery-ui/target/discovery-ui-1.1.0-SNAPSHOT.jar
+ asserts_file_exist $msb_src_folder/discovery/sdclient/discovery-service/target/original-discovery-service-1.1.0-SNAPSHOT.jar
+ asserts_file_exist $msb_src_folder/java-sdk/target/msb-java-sdk-1.1.0-SNAPSHOT.jar
+ asserts_file_exist $msb_src_folder/swagger-sdk/target/swagger-sdk-1.1.0-SNAPSHOT.jar
+}
+
+# test_get_msb_images() - Verify the creation of MSB Docker images
+function test_get_msb_images {
+ clone_repos "msb"
+ get_msb_images
+
+ for image in base apigateway discovery; do
+ asserts_image nexus3.onap.org:10001/onap/msb/msb_$image
+ done
+}
+
+# test_install_msb - Verify the execution of MSB Docker images
+function test_install_msb {
+ clone_repos "msb"
+ get_msb_images
+ install_msb
+
+ for image in apigateway discovery; do
+ asserts_image_running nexus3.onap.org:10001/onap/msb/msb_$image
+ done
+
+ asserts_http_status_code "http://127.0.0.1:10081/api/microservices/v1/services"
+ asserts_http_status_code "http://127.0.0.1/api/aai/v8/cloud-infrastructure/cloud-regions"
+}
+
+if [ "$1" != '*' ]; then
+ unset covered_functions
+ covered_functions=$1
+fi
+main "${covered_functions[@]}"