You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ji...@apache.org on 2015/12/08 21:59:36 UTC

mesos git commit: Fixed a broken test: HealthTest.ObserveEndpoint.

Repository: mesos
Updated Branches:
  refs/heads/master f530ef964 -> 72777d14d


Fixed a broken test: HealthTest.ObserveEndpoint.

Broken by the error message punctuation changes committed recently.

Review: https://reviews.apache.org/r/41100


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/72777d14
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/72777d14
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/72777d14

Branch: refs/heads/master
Commit: 72777d14dbec2b05088dd538250141aa9f593469
Parents: f530ef9
Author: Neil Conway <ne...@gmail.com>
Authored: Tue Dec 8 12:59:25 2015 -0800
Committer: Jie Yu <yu...@gmail.com>
Committed: Tue Dec 8 12:59:25 2015 -0800

----------------------------------------------------------------------
 src/tests/repair_tests.cpp | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/72777d14/src/tests/repair_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/repair_tests.cpp b/src/tests/repair_tests.cpp
index a3ea872..63ec889 100644
--- a/src/tests/repair_tests.cpp
+++ b/src/tests/repair_tests.cpp
@@ -96,15 +96,15 @@ TEST_F(HealthTest, ObserveEndpoint)
 
   // Empty get to the observe endpoint.
   Future<Response> response = process::http::get(master.get(), "observe");
-  VALIDATE_BAD_RESPONSE(response, "Missing value for 'monitor'.");
+  VALIDATE_BAD_RESPONSE(response, "Missing value for 'monitor'");
 
   // Empty post to the observe endpoint.
   response = process::http::post(master.get(), "observe");
-  VALIDATE_BAD_RESPONSE(response, "Missing value for 'monitor'.");
+  VALIDATE_BAD_RESPONSE(response, "Missing value for 'monitor'");
 
   // Query string is ignored.
   response = process::http::post(master.get(), "observe?monitor=foo");
-  VALIDATE_BAD_RESPONSE(response, "Missing value for 'monitor'.");
+  VALIDATE_BAD_RESPONSE(response, "Missing value for 'monitor'");
 
   // Malformed value causes error.
   response = process::http::post(
@@ -122,7 +122,7 @@ TEST_F(HealthTest, ObserveEndpoint)
       "observe",
       None(),
       "monitor=");
-  VALIDATE_BAD_RESPONSE(response, "Empty string for 'monitor'.");
+  VALIDATE_BAD_RESPONSE(response, "Empty string for 'monitor'");
 
   // Missing hosts.
   response = process::http::post(
@@ -130,7 +130,7 @@ TEST_F(HealthTest, ObserveEndpoint)
       "observe",
       None(),
       "monitor=a");
-  VALIDATE_BAD_RESPONSE(response, "Missing value for 'hosts'.");
+  VALIDATE_BAD_RESPONSE(response, "Missing value for 'hosts'");
 
   // Missing level.
   response = process::http::post(
@@ -138,7 +138,7 @@ TEST_F(HealthTest, ObserveEndpoint)
       "observe",
       None(),
       "monitor=a&hosts=b");
-  VALIDATE_BAD_RESPONSE(response, "Missing value for 'level'.");
+  VALIDATE_BAD_RESPONSE(response, "Missing value for 'level'");
 
   // Good request is successful.
   JsonResponse expected;
@@ -151,7 +151,7 @@ TEST_F(HealthTest, ObserveEndpoint)
       "observe",
       None(),
       "monitor=a&hosts=b&level=ok");
-  VALIDATE_GOOD_RESPONSE(response, stringify(expected) );
+  VALIDATE_GOOD_RESPONSE(response, stringify(expected));
 
   // ok is case-insensitive.
   response = process::http::post(
@@ -159,21 +159,21 @@ TEST_F(HealthTest, ObserveEndpoint)
       "observe",
       None(),
       "monitor=a&hosts=b&level=Ok");
-  VALIDATE_GOOD_RESPONSE(response, stringify(expected) );
+  VALIDATE_GOOD_RESPONSE(response, stringify(expected));
 
   response = process::http::post(
       master.get(),
       "observe",
       None(),
       "monitor=a&hosts=b&level=oK");
-  VALIDATE_GOOD_RESPONSE(response, stringify(expected) );
+  VALIDATE_GOOD_RESPONSE(response, stringify(expected));
 
   response = process::http::post(
       master.get(),
       "observe",
       None(),
       "monitor=a&hosts=b&level=OK");
-  VALIDATE_GOOD_RESPONSE(response, stringify(expected) );
+  VALIDATE_GOOD_RESPONSE(response, stringify(expected));
 
   // level != OK  is unhealthy.
   expected.isHealthy = false;
@@ -183,7 +183,7 @@ TEST_F(HealthTest, ObserveEndpoint)
       "observe",
       None(),
       "monitor=a&hosts=b&level=true");
-  VALIDATE_GOOD_RESPONSE(response, stringify(expected) );
+  VALIDATE_GOOD_RESPONSE(response, stringify(expected));
 
   // Comma-separated hosts are parsed into an array.
   expected.hosts.push_back("e");
@@ -192,7 +192,7 @@ TEST_F(HealthTest, ObserveEndpoint)
       "observe",
       None(),
       "monitor=a&hosts=b,e&level=true");
-  VALIDATE_GOOD_RESPONSE(response, stringify(expected) );
+  VALIDATE_GOOD_RESPONSE(response, stringify(expected));
 
   Shutdown();
 }