You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by cs...@apache.org on 2017/06/28 16:41:00 UTC

[incubator-openwhisk-package-kafka] branch master updated: Update health test to take the full health URL (#188)

This is an automated email from the ASF dual-hosted git repository.

csantanapr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-package-kafka.git


The following commit(s) were added to refs/heads/master by this push:
     new 2de1930  Update health test to take the full health URL (#188)
2de1930 is described below

commit 2de193069c484351faa1ec97745be83e555c5fab
Author: Justin Berstler <bj...@us.ibm.com>
AuthorDate: Wed Jun 28 12:40:58 2017 -0400

    Update health test to take the full health URL (#188)
---
 tests/build.gradle                                       | 1 +
 tests/src/test/scala/system/health/BasicHealthTest.scala | 7 +------
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/tests/build.gradle b/tests/build.gradle
index c256887..fc8cacf 100644
--- a/tests/build.gradle
+++ b/tests/build.gradle
@@ -13,6 +13,7 @@ repositories {
 
 def commonConfiguration = {
   systemProperty 'testthreads', System.getProperty('testthreads', '1')
+  systemProperty 'health_url', System.getProperty('health_url', '')
   systemProperty 'host', System.getProperty('host', '')
   systemProperty 'port', System.getProperty('port', '')
   systemProperty 'trigger.suffix', System.getProperty('trigger.suffix', '')
diff --git a/tests/src/test/scala/system/health/BasicHealthTest.scala b/tests/src/test/scala/system/health/BasicHealthTest.scala
index 937b969..348af7f 100644
--- a/tests/src/test/scala/system/health/BasicHealthTest.scala
+++ b/tests/src/test/scala/system/health/BasicHealthTest.scala
@@ -71,11 +71,6 @@ class BasicHealthTest
 
     val kafkaUtils = new KafkaUtils
 
-    val getMessagingAddress =
-      if (System.getProperty("host") != "" && System.getProperty("port") != "") {
-        "http://" + System.getProperty("host") + ":" + System.getProperty("port")
-      }
-
     behavior of "Message Hub feed"
 
     it should "create a new trigger" in withAssetCleaner(wskprops) {
@@ -102,7 +97,7 @@ class BasicHealthTest
 
                     // get /health endpoint and ensure it contains the new uuid
                     retry({
-                        val response = RestAssured.given().get(getMessagingAddress + "/health")
+                        val response = RestAssured.given().get(System.getProperty("health_url"))
                         assert(response.statusCode() == 200 && response.asString().contains(uuid))
                     }, N = 3)
             }

-- 
To stop receiving notification emails like this one, please contact
['"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>'].