You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by al...@apache.org on 2017/10/17 00:44:23 UTC

[04/14] mesos git commit: Removed no longer necessary response body output in tests.

Removed no longer necessary response body output in tests.

Since `AwaitAssertResponseStatusEq` now prints response body in case
of assertion failure, adding it manually to `AssertionResult` at call
site is no longer necessary.

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


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

Branch: refs/heads/master
Commit: 024e544f2a185fe6e83adc42bbb2451f66cc6e23
Parents: c73cd6d
Author: Alexander Rukletsov <al...@apache.org>
Authored: Wed Oct 11 19:50:36 2017 -0700
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Mon Oct 16 17:02:48 2017 -0700

----------------------------------------------------------------------
 src/tests/dynamic_weights_tests.cpp           |  55 +++----
 src/tests/master_allocator_tests.cpp          |   3 +-
 src/tests/master_authorization_tests.cpp      |  48 ++----
 src/tests/master_quota_tests.cpp              | 163 ++++++++-------------
 src/tests/registrar_tests.cpp                 |   9 +-
 src/tests/reservation_endpoints_tests.cpp     |   3 +-
 src/tests/resource_provider_manager_tests.cpp |   5 +-
 src/tests/role_tests.cpp                      |  21 +--
 src/tests/slave_authorization_tests.cpp       |  27 ++--
 src/tests/slave_tests.cpp                     |   9 +-
 10 files changed, 118 insertions(+), 225 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/024e544f/src/tests/dynamic_weights_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/dynamic_weights_tests.cpp b/src/tests/dynamic_weights_tests.cpp
index da9b53d..5cc8691 100644
--- a/src/tests/dynamic_weights_tests.cpp
+++ b/src/tests/dynamic_weights_tests.cpp
@@ -95,9 +95,7 @@ protected:
             "weights",
             createBasicAuthHeaders(credential)));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
-
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
     AWAIT_EXPECT_RESPONSE_HEADER_EQ(APPLICATION_JSON, "Content-Type", response);
 
     Try<JSON::Value> parse = JSON::parse(response->body);
@@ -167,8 +165,7 @@ TEST_F(DynamicWeightsTest, PutInvalidRequest)
           createBasicAuthHeaders(DEFAULT_CREDENTIAL),
           badRequest));
 
-  AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response)
-    << response->body;
+  AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response);
 
   checkWithGetRequest(master.get()->pid, DEFAULT_CREDENTIAL);
 
@@ -189,8 +186,7 @@ TEST_F(DynamicWeightsTest, PutInvalidRequest)
           createBasicAuthHeaders(DEFAULT_CREDENTIAL),
           badRequest));
 
-  AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response)
-    << response->body;
+  AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response);
 
   checkWithGetRequest(master.get()->pid, DEFAULT_CREDENTIAL);
 }
@@ -214,8 +210,7 @@ TEST_F(DynamicWeightsTest, ZeroWeight)
           createBasicAuthHeaders(DEFAULT_CREDENTIAL),
           strings::format("%s", JSON::protobuf(infos)).get()));
 
-  AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response)
-    << response->body;
+  AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response);
 
   checkWithGetRequest(master.get()->pid, DEFAULT_CREDENTIAL);
 }
@@ -239,8 +234,7 @@ TEST_F(DynamicWeightsTest, NegativeWeight)
           createBasicAuthHeaders(DEFAULT_CREDENTIAL),
           strings::format("%s", JSON::protobuf(infos)).get()));
 
-  AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response)
-    << response->body;
+  AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response);
 
   checkWithGetRequest(master.get()->pid, DEFAULT_CREDENTIAL);
 }
@@ -264,8 +258,7 @@ TEST_F(DynamicWeightsTest, NonNumericWeight)
           createBasicAuthHeaders(DEFAULT_CREDENTIAL),
           strings::format("%s", JSON::protobuf(infos)).get()));
 
-  AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response)
-    << response->body;
+  AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response);
 
   checkWithGetRequest(master.get()->pid, DEFAULT_CREDENTIAL);
 }
@@ -288,8 +281,7 @@ TEST_F(DynamicWeightsTest, MissingRole)
           createBasicAuthHeaders(DEFAULT_CREDENTIAL),
           "weights=[{\"weight\":2.0}]"));
 
-  AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response1)
-    << response1->body;
+  AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response1);
 
   checkWithGetRequest(master.get()->pid, DEFAULT_CREDENTIAL);
 
@@ -304,8 +296,7 @@ TEST_F(DynamicWeightsTest, MissingRole)
           createBasicAuthHeaders(DEFAULT_CREDENTIAL),
           strings::format("%s", JSON::protobuf(infos)).get()));
 
-  AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response2)
-    << response2->body;
+  AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response2);
 
   checkWithGetRequest(master.get()->pid, DEFAULT_CREDENTIAL);
 }
@@ -333,8 +324,7 @@ TEST_F(DynamicWeightsTest, UnknownRole)
           createBasicAuthHeaders(DEFAULT_CREDENTIAL),
           strings::format("%s", JSON::protobuf(infos)).get()));
 
-  AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response)
-    << response->body;
+  AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response);
 
   checkWithGetRequest(master.get()->pid, DEFAULT_CREDENTIAL);
 }
@@ -364,8 +354,7 @@ TEST_F(DynamicWeightsTest, UpdateWeightsWithExplictRoles)
           createBasicAuthHeaders(DEFAULT_CREDENTIAL),
           strings::format("%s", JSON::protobuf(infos)).get()));
 
-  AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-    << response->body;
+  AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
   checkWithGetRequest(master.get()->pid, DEFAULT_CREDENTIAL, UPDATED_WEIGHTS1);
 }
@@ -395,8 +384,7 @@ TEST_F(DynamicWeightsTest, UnauthenticatedUpdateWeightRequest)
           createBasicAuthHeaders(credential),
           strings::format("%s", JSON::protobuf(infos)).get()));
 
-  AWAIT_EXPECT_RESPONSE_STATUS_EQ(Unauthorized({}).status, response1)
-    << response1->body;
+  AWAIT_EXPECT_RESPONSE_STATUS_EQ(Unauthorized({}).status, response1);
 
   checkWithGetRequest(master.get()->pid, DEFAULT_CREDENTIAL);
 
@@ -411,8 +399,7 @@ TEST_F(DynamicWeightsTest, UnauthenticatedUpdateWeightRequest)
           None(),
           strings::format("%s", JSON::protobuf(infos)).get()));
 
-  AWAIT_EXPECT_RESPONSE_STATUS_EQ(Unauthorized({}).status, response2)
-    << response2->body;
+  AWAIT_EXPECT_RESPONSE_STATUS_EQ(Unauthorized({}).status, response2);
 
   checkWithGetRequest(master.get()->pid, DEFAULT_CREDENTIAL);
 }
@@ -440,8 +427,7 @@ TEST_F(DynamicWeightsTest, UnauthenticatedQueryWeightRequest)
           "weights",
           createBasicAuthHeaders(credential)));
 
-  AWAIT_EXPECT_RESPONSE_STATUS_EQ(Unauthorized({}).status, response)
-    << response->body;
+  AWAIT_EXPECT_RESPONSE_STATUS_EQ(Unauthorized({}).status, response);
 }
 
 
@@ -484,8 +470,7 @@ TEST_F(DynamicWeightsTest, AuthorizedGetWeightsRequest)
           createBasicAuthHeaders(DEFAULT_CREDENTIAL),
           strings::format("%s", JSON::protobuf(infos)).get()));
 
-  AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-    << response->body;
+  AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
   checkWithGetRequest(master.get()->pid, DEFAULT_CREDENTIAL, GET_WEIGHTS1);
 
@@ -528,8 +513,7 @@ TEST_F(DynamicWeightsTest, AuthorizedWeightUpdateRequest)
           createBasicAuthHeaders(DEFAULT_CREDENTIAL),
           strings::format("%s", JSON::protobuf(infos)).get()));
 
-  AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-    << response->body;
+  AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
   checkWithGetRequest(master.get()->pid, DEFAULT_CREDENTIAL, UPDATED_WEIGHTS1);
 }
@@ -573,8 +557,7 @@ TEST_F(DynamicWeightsTest, AuthorizedUpdateWeightRequestWithoutPrincipal)
           None(),
           strings::format("%s", JSON::protobuf(infos)).get()));
 
-  AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-    << response->body;
+  AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
   checkWithGetRequest(master.get()->pid, DEFAULT_CREDENTIAL, UPDATED_WEIGHTS1);
 }
@@ -605,8 +588,7 @@ TEST_F(DynamicWeightsTest, UnauthorizedWeightUpdateRequest)
           createBasicAuthHeaders(DEFAULT_CREDENTIAL),
           strings::format("%s", JSON::protobuf(infos)).get()));
 
-  AWAIT_EXPECT_RESPONSE_STATUS_EQ(Forbidden().status, response)
-    << response->body;
+  AWAIT_EXPECT_RESPONSE_STATUS_EQ(Forbidden().status, response);
 
   checkWithGetRequest(master.get()->pid, DEFAULT_CREDENTIAL);
 }
@@ -659,8 +641,7 @@ TEST_F(DynamicWeightsTest, RecoveredWeightsFromRegistry)
             createBasicAuthHeaders(DEFAULT_CREDENTIAL),
             strings::format("%s", JSON::protobuf(infos)).get()));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
     checkWithGetRequest(
         master.get()->pid,

http://git-wip-us.apache.org/repos/asf/mesos/blob/024e544f/src/tests/master_allocator_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_allocator_tests.cpp b/src/tests/master_allocator_tests.cpp
index f8b315c..3400d70 100644
--- a/src/tests/master_allocator_tests.cpp
+++ b/src/tests/master_allocator_tests.cpp
@@ -1735,8 +1735,7 @@ TYPED_TEST(MasterAllocatorTest, RebalancedForUpdatedWeights)
           createBasicAuthHeaders(DEFAULT_CREDENTIAL),
           strings::format("%s", JSON::protobuf(infos)).get()));
 
-  AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-    << response->body;
+  AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
   // 'updateWeights' will rescind all outstanding offers and the rescinded
   // offer resources will only be available to the updated weights once

http://git-wip-us.apache.org/repos/asf/mesos/blob/024e544f/src/tests/master_authorization_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_authorization_tests.cpp b/src/tests/master_authorization_tests.cpp
index d8593d8..eff97f1 100644
--- a/src/tests/master_authorization_tests.cpp
+++ b/src/tests/master_authorization_tests.cpp
@@ -1392,8 +1392,7 @@ TYPED_TEST(MasterAuthorizerTest, FilterStateSummaryEndpoint)
         None(),
         createBasicAuthHeaders(DEFAULT_CREDENTIAL));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
     Try<JSON::Object> parse = JSON::parse<JSON::Object>(response->body);
     ASSERT_SOME(parse);
@@ -1413,8 +1412,7 @@ TYPED_TEST(MasterAuthorizerTest, FilterStateSummaryEndpoint)
         None(),
         createBasicAuthHeaders(DEFAULT_CREDENTIAL_2));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
     Try<JSON::Object> parse = JSON::parse<JSON::Object>(response->body);
     ASSERT_SOME(parse);
@@ -1569,8 +1567,7 @@ TYPED_TEST(MasterAuthorizerTest, FilterStateEndpoint)
         None(),
         createBasicAuthHeaders(DEFAULT_CREDENTIAL));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
     Try<JSON::Object> parse = JSON::parse<JSON::Object>(response->body);
     ASSERT_SOME(parse);
@@ -1598,8 +1595,7 @@ TYPED_TEST(MasterAuthorizerTest, FilterStateEndpoint)
         None(),
         createBasicAuthHeaders(DEFAULT_CREDENTIAL_2));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
     Try<JSON::Object> parse = JSON::parse<JSON::Object>(response->body);
     ASSERT_SOME(parse);
@@ -1758,8 +1754,7 @@ TYPED_TEST(MasterAuthorizerTest, FilterFrameworksEndpoint)
         None(),
         createBasicAuthHeaders(DEFAULT_CREDENTIAL));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
     Try<JSON::Object> parse = JSON::parse<JSON::Object>(response->body);
     ASSERT_SOME(parse);
@@ -1787,8 +1782,7 @@ TYPED_TEST(MasterAuthorizerTest, FilterFrameworksEndpoint)
         None(),
         createBasicAuthHeaders(DEFAULT_CREDENTIAL_2));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
     Try<JSON::Object> parse = JSON::parse<JSON::Object>(response->body);
     ASSERT_SOME(parse);
@@ -1949,8 +1943,7 @@ TYPED_TEST(MasterAuthorizerTest, FilterTasksEndpoint)
         None(),
         createBasicAuthHeaders(DEFAULT_CREDENTIAL));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
     Try<JSON::Object> parse = JSON::parse<JSON::Object>(response->body);
     ASSERT_SOME(parse);
@@ -1969,8 +1962,7 @@ TYPED_TEST(MasterAuthorizerTest, FilterTasksEndpoint)
         None(),
         createBasicAuthHeaders(DEFAULT_CREDENTIAL_2));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
     Try<JSON::Object> parse = JSON::parse<JSON::Object>(response->body);
     ASSERT_SOME(parse);
@@ -2022,8 +2014,7 @@ TYPED_TEST(MasterAuthorizerTest, ViewFlags)
         None(),
         createBasicAuthHeaders(DEFAULT_CREDENTIAL));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-        << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
     response = http::get(
         master.get()->pid,
@@ -2031,8 +2022,7 @@ TYPED_TEST(MasterAuthorizerTest, ViewFlags)
         None(),
         createBasicAuthHeaders(DEFAULT_CREDENTIAL));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-        << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
     Try<JSON::Object> parse = JSON::parse<JSON::Object>(response->body);
     ASSERT_SOME(parse);
@@ -2051,8 +2041,7 @@ TYPED_TEST(MasterAuthorizerTest, ViewFlags)
         None(),
         createBasicAuthHeaders(DEFAULT_CREDENTIAL_2));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(Forbidden().status, response)
-        << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(Forbidden().status, response);
 
     response = http::get(
         master.get()->pid,
@@ -2060,8 +2049,7 @@ TYPED_TEST(MasterAuthorizerTest, ViewFlags)
         None(),
         createBasicAuthHeaders(DEFAULT_CREDENTIAL_2));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-        << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
     Try<JSON::Object> parse = JSON::parse<JSON::Object>(response->body);
     ASSERT_SOME(parse);
@@ -2119,8 +2107,7 @@ TYPED_TEST(MasterAuthorizerTest, FilterRolesEndpoint)
         None(),
         createBasicAuthHeaders(DEFAULT_CREDENTIAL));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
     Try<JSON::Object> parse = JSON::parse<JSON::Object>(response->body);
     ASSERT_SOME(parse);
@@ -2138,8 +2125,7 @@ TYPED_TEST(MasterAuthorizerTest, FilterRolesEndpoint)
         None(),
         createBasicAuthHeaders(DEFAULT_CREDENTIAL_2));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
     Try<JSON::Object> parse = JSON::parse<JSON::Object>(response->body);
     ASSERT_SOME(parse);
@@ -2279,8 +2265,7 @@ TYPED_TEST(MasterAuthorizerTest, FilterOrphanedTasks)
         None(),
         createBasicAuthHeaders(DEFAULT_CREDENTIAL));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
     Try<JSON::Object> parse = JSON::parse<JSON::Object>(response->body);
     ASSERT_SOME(parse);
@@ -2309,8 +2294,7 @@ TYPED_TEST(MasterAuthorizerTest, FilterOrphanedTasks)
         None(),
         createBasicAuthHeaders(DEFAULT_CREDENTIAL_2));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
     Try<JSON::Object> parse = JSON::parse<JSON::Object>(response->body);
     ASSERT_SOME(parse);

http://git-wip-us.apache.org/repos/asf/mesos/blob/024e544f/src/tests/master_quota_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_quota_tests.cpp b/src/tests/master_quota_tests.cpp
index f9feb67..058f6d2 100644
--- a/src/tests/master_quota_tests.cpp
+++ b/src/tests/master_quota_tests.cpp
@@ -184,8 +184,7 @@ TEST_F(MasterQuotaTest, SetForNonExistentRole)
       createBasicAuthHeaders(DEFAULT_CREDENTIAL),
       createRequestBody("non-existent-role", quotaResources, FORCE));
 
-  AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response)
-    << response->body;
+  AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response);
 }
 
 
@@ -216,8 +215,7 @@ TEST_F(MasterQuotaTest, InvalidSetRequest)
 
     Future<Response> response = postQuota(badRequest);
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response);
   }
 
   // Tests whether a quota request with missing 'role' field fails.
@@ -235,8 +233,7 @@ TEST_F(MasterQuotaTest, InvalidSetRequest)
 
     Future<Response> response = postQuota(badRequest);
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response);
   }
 
   // Tests whether a quota request with missing 'resource' field fails.
@@ -249,8 +246,7 @@ TEST_F(MasterQuotaTest, InvalidSetRequest)
 
     Future<Response> response = postQuota(badRequest);
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response);
   }
 
   // Tests whether a quota request with invalid resources fails.
@@ -265,8 +261,7 @@ TEST_F(MasterQuotaTest, InvalidSetRequest)
 
     Future<Response> response = postQuota(badRequest);
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response);
   }
 }
 
@@ -299,8 +294,7 @@ TEST_F(MasterQuotaTest, SetRequestWithInvalidData)
 
     Future<Response> response = postQuota(ROLE1, quotaResources);
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response);
   }
 
   // A quota set request with a role set in any of the `Resource` objects
@@ -310,8 +304,7 @@ TEST_F(MasterQuotaTest, SetRequestWithInvalidData)
 
     Future<Response> response = postQuota(ROLE1, quotaResources);
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response);
   }
 
   // A quota set request with a duplicate resource name should
@@ -335,12 +328,10 @@ TEST_F(MasterQuotaTest, SetRequestWithInvalidData)
         badRequest);
 
     AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response);
-
     AWAIT_EXPECT_RESPONSE_BODY_EQ(
         "Failed to validate set quota request:"
         " QuotaInfo contains duplicate resource name 'cpus'",
-        response)
-     << response->body;
+        response);
   }
 
 
@@ -355,8 +346,7 @@ TEST_F(MasterQuotaTest, SetRequestWithInvalidData)
 
     Future<Response> response = postQuota(ROLE1, quotaResources);
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response);
   }
 
   // A quota set request with the `RevocableInfo` field set should return
@@ -370,8 +360,7 @@ TEST_F(MasterQuotaTest, SetRequestWithInvalidData)
 
     Future<Response> response = postQuota(ROLE1, quotaResources);
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response);
   }
 
   // A quota set request with the `ReservationInfo` field set should return
@@ -388,8 +377,7 @@ TEST_F(MasterQuotaTest, SetRequestWithInvalidData)
 
     Future<Response> response = postQuota(ROLE1, quotaResources);
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response);
   }
 }
 
@@ -415,8 +403,7 @@ TEST_F(MasterQuotaTest, SetExistingQuota)
         createBasicAuthHeaders(DEFAULT_CREDENTIAL),
         createRequestBody(ROLE1, quotaResources, FORCE));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
   }
 
   // Try to set quota via post a second time.
@@ -427,8 +414,7 @@ TEST_F(MasterQuotaTest, SetExistingQuota)
         createBasicAuthHeaders(DEFAULT_CREDENTIAL),
         createRequestBody(ROLE1, quotaResources, FORCE));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response);
   }
 }
 
@@ -460,16 +446,14 @@ TEST_F(MasterQuotaTest, RemoveSingleQuota)
   {
     Future<Response> response = removeQuota("quota/" + UNKNOWN_ROLE);
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response);
   }
 
   // Ensure that we can't remove quota for a role that has no quota set.
   {
     Future<Response> response = removeQuota("quota/" + ROLE1);
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response);
   }
 
   // Ensure we can remove the quota we have requested before.
@@ -482,8 +466,7 @@ TEST_F(MasterQuotaTest, RemoveSingleQuota)
         createBasicAuthHeaders(DEFAULT_CREDENTIAL),
         createRequestBody(ROLE1, quotaResources, FORCE));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
     // Remove the previously requested quota.
     Future<Nothing> receivedRemoveRequest;
@@ -493,8 +476,7 @@ TEST_F(MasterQuotaTest, RemoveSingleQuota)
 
     response = removeQuota("quota/" + ROLE1);
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
     // Ensure that the quota remove request has reached the allocator.
     AWAIT_READY(receivedRemoveRequest);
@@ -523,8 +505,7 @@ TEST_F(MasterQuotaTest, Status)
         None(),
         createBasicAuthHeaders(DEFAULT_CREDENTIAL));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
     EXPECT_SOME_EQ(
         "application/json",
@@ -550,8 +531,7 @@ TEST_F(MasterQuotaTest, Status)
         createBasicAuthHeaders(DEFAULT_CREDENTIAL),
         createRequestBody(ROLE1, quotaResources, FORCE));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
   }
 
   // Query the master quota endpoint when quota is set for a single role.
@@ -562,8 +542,7 @@ TEST_F(MasterQuotaTest, Status)
         None(),
         createBasicAuthHeaders(DEFAULT_CREDENTIAL));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
     EXPECT_SOME_EQ(
         "application/json",
@@ -648,8 +627,7 @@ TEST_F(MasterQuotaTest, InsufficientResourcesSingleAgent)
         createBasicAuthHeaders(DEFAULT_CREDENTIAL),
         createRequestBody(ROLE1, quotaResources));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(Conflict().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(Conflict().status, response);
   }
 
   // Force flag should override the `capacityHeuristic` check and make the
@@ -661,8 +639,7 @@ TEST_F(MasterQuotaTest, InsufficientResourcesSingleAgent)
         createBasicAuthHeaders(DEFAULT_CREDENTIAL),
         createRequestBody(ROLE1, quotaResources, true));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
   }
 }
 
@@ -725,8 +702,7 @@ TEST_F(MasterQuotaTest, InsufficientResourcesMultipleAgents)
         createBasicAuthHeaders(DEFAULT_CREDENTIAL),
         createRequestBody(ROLE1, quotaResources));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(Conflict().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(Conflict().status, response);
   }
 
   // Force flag should override the `capacityHeuristic` check and make the
@@ -738,8 +714,7 @@ TEST_F(MasterQuotaTest, InsufficientResourcesMultipleAgents)
         createBasicAuthHeaders(DEFAULT_CREDENTIAL),
         createRequestBody(ROLE1, quotaResources, true));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
   }
 }
 
@@ -783,7 +758,7 @@ TEST_F(MasterQuotaTest, AvailableResourcesSingleAgent)
       createBasicAuthHeaders(DEFAULT_CREDENTIAL),
       createRequestBody(ROLE1, quotaResources));
 
-  AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response) << response->body;
+  AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
   // Quota request is granted and reached the allocator. Make sure nothing
   // got lost in-between.
@@ -851,7 +826,7 @@ TEST_F(MasterQuotaTest, AvailableResourcesMultipleAgents)
       createBasicAuthHeaders(DEFAULT_CREDENTIAL),
       createRequestBody(ROLE1, quotaResources));
 
-  AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response) << response->body;
+  AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
   // Quota request is granted and reached the allocator. Make sure nothing
   // got lost in-between.
@@ -1022,7 +997,7 @@ TEST_F(MasterQuotaTest, AvailableResourcesAfterRescinding)
   //   framework2 share = 0
   //   framework3 share = 0
 
-  AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response) << response->body;
+  AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
   // The quota request is granted and reached the allocator. Make sure nothing
   // got lost in-between.
@@ -1099,8 +1074,7 @@ TEST_F(MasterQuotaTest, RecoverQuotaEmptyCluster)
         createBasicAuthHeaders(DEFAULT_CREDENTIAL),
         createRequestBody(ROLE1, quotaResources, FORCE));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
   }
 
   TestAllocator<> allocator;
@@ -1125,8 +1099,7 @@ TEST_F(MasterQuotaTest, RecoverQuotaEmptyCluster)
 
     // Quota request succeeds and reaches the allocator.
     AWAIT_READY(receivedRemoveRequest);
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
   }
 }
 
@@ -1173,8 +1146,7 @@ TEST_F(MasterQuotaTest, NoAuthenticationNoAuthorization)
 
     // Quota request succeeds and reaches the allocator.
     AWAIT_READY(receivedSetRequest);
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
   }
 
   // Check whether quota can be removed.
@@ -1192,8 +1164,7 @@ TEST_F(MasterQuotaTest, NoAuthenticationNoAuthorization)
 
     // Quota request succeeds and reaches the allocator.
     AWAIT_READY(receivedRemoveRequest);
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
   }
 }
 
@@ -1224,8 +1195,7 @@ TEST_F(MasterQuotaTest, UnauthenticatedQuotaRequest)
         createBasicAuthHeaders(credential),
         createRequestBody(ROLE1, quotaResources));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(Unauthorized({}).status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(Unauthorized({}).status, response);
   }
 
   // The absence of credentials leads to authentication failure as well.
@@ -1236,8 +1206,7 @@ TEST_F(MasterQuotaTest, UnauthenticatedQuotaRequest)
         None(),
         createRequestBody(ROLE1, quotaResources));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(Unauthorized({}).status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(Unauthorized({}).status, response);
   }
 }
 
@@ -1295,8 +1264,7 @@ TEST_F(MasterQuotaTest, AuthorizeGetUpdateQuotaRequests)
         createBasicAuthHeaders(DEFAULT_CREDENTIAL_2),
         createRequestBody(ROLE1, quotaResources, FORCE));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(Forbidden().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(Forbidden().status, response);
   }
 
   // Set quota using the default principal.
@@ -1317,8 +1285,7 @@ TEST_F(MasterQuotaTest, AuthorizeGetUpdateQuotaRequests)
         createBasicAuthHeaders(DEFAULT_CREDENTIAL),
         createRequestBody(ROLE1, quotaResources, FORCE));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
     AWAIT_READY(quota);
 
@@ -1342,8 +1309,7 @@ TEST_F(MasterQuotaTest, AuthorizeGetUpdateQuotaRequests)
         None(),
         createBasicAuthHeaders(DEFAULT_CREDENTIAL_2));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
     EXPECT_SOME_EQ(
         "application/json",
@@ -1370,8 +1336,7 @@ TEST_F(MasterQuotaTest, AuthorizeGetUpdateQuotaRequests)
         None(),
         createBasicAuthHeaders(DEFAULT_CREDENTIAL));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
     EXPECT_SOME_EQ(
         "application/json",
@@ -1399,8 +1364,7 @@ TEST_F(MasterQuotaTest, AuthorizeGetUpdateQuotaRequests)
         "quota/" + ROLE1,
         createBasicAuthHeaders(DEFAULT_CREDENTIAL_2));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(Forbidden().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(Forbidden().status, response);
   }
 
   // Remove the previously requested quota using the default principal.
@@ -1415,8 +1379,7 @@ TEST_F(MasterQuotaTest, AuthorizeGetUpdateQuotaRequests)
         "quota/" + ROLE1,
         createBasicAuthHeaders(DEFAULT_CREDENTIAL));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
     AWAIT_READY(receivedRemoveRequest);
   }
@@ -1468,8 +1431,7 @@ TEST_F(MasterQuotaTest, AuthorizeGetUpdateQuotaRequestsWithoutPrincipal)
         None(),
         createRequestBody(ROLE1, quotaResources, FORCE));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
   }
 
   // Get the previously requested quota without providing authorization
@@ -1481,8 +1443,7 @@ TEST_F(MasterQuotaTest, AuthorizeGetUpdateQuotaRequestsWithoutPrincipal)
         None(),
         None());
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
     EXPECT_SOME_EQ(
         "application/json",
@@ -1509,8 +1470,7 @@ TEST_F(MasterQuotaTest, AuthorizeGetUpdateQuotaRequestsWithoutPrincipal)
         "quota/" + ROLE1,
         None());
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
   }
 }
 
@@ -1541,7 +1501,7 @@ TEST_F(MasterQuotaTest, DISABLED_ChildRole)
         createBasicAuthHeaders(DEFAULT_CREDENTIAL),
         createRequestBody(PARENT_ROLE, parentQuotaResources, FORCE));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response) << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
   }
 
   // Set quota for the child role.
@@ -1554,7 +1514,7 @@ TEST_F(MasterQuotaTest, DISABLED_ChildRole)
         createBasicAuthHeaders(DEFAULT_CREDENTIAL),
         createRequestBody(CHILD_ROLE, childQuotaResources, FORCE));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response) << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
   }
 
   // Query the configured quota.
@@ -1565,8 +1525,7 @@ TEST_F(MasterQuotaTest, DISABLED_ChildRole)
         None(),
         createBasicAuthHeaders(DEFAULT_CREDENTIAL));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
     EXPECT_SOME_EQ(
         "application/json",
@@ -1601,7 +1560,7 @@ TEST_F(MasterQuotaTest, DISABLED_ChildRole)
         "quota/" + CHILD_ROLE,
         createBasicAuthHeaders(DEFAULT_CREDENTIAL));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response) << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
   }
 }
 
@@ -1631,8 +1590,7 @@ TEST_F(MasterQuotaTest, DISABLED_ChildRoleWithNoParentQuota)
         createBasicAuthHeaders(DEFAULT_CREDENTIAL),
         createRequestBody(CHILD_ROLE, childQuotaResources, FORCE));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response);
   }
 }
 
@@ -1663,7 +1621,7 @@ TEST_F(MasterQuotaTest, DISABLED_ChildRoleExceedsParentQuota)
         createBasicAuthHeaders(DEFAULT_CREDENTIAL),
         createRequestBody(PARENT_ROLE, parentQuotaResources, FORCE));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response) << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
   }
 
   // Attempt to set quota for the child role. Because the child role's
@@ -1677,8 +1635,7 @@ TEST_F(MasterQuotaTest, DISABLED_ChildRoleExceedsParentQuota)
         createBasicAuthHeaders(DEFAULT_CREDENTIAL),
         createRequestBody(CHILD_ROLE, childQuotaResources, FORCE));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response);
   }
 }
 
@@ -1711,7 +1668,7 @@ TEST_F(MasterQuotaTest, DISABLED_ChildRoleSumExceedsParentQuota)
         createBasicAuthHeaders(DEFAULT_CREDENTIAL),
         createRequestBody(PARENT_ROLE, parentQuotaResources, FORCE));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response) << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
   }
 
   // Set quota for the first child role. This should succeed.
@@ -1724,8 +1681,7 @@ TEST_F(MasterQuotaTest, DISABLED_ChildRoleSumExceedsParentQuota)
         createBasicAuthHeaders(DEFAULT_CREDENTIAL),
         createRequestBody(CHILD_ROLE1, childQuotaResources, FORCE));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
   }
 
   // Attempt to set quota for the second child role. This should fail,
@@ -1738,8 +1694,7 @@ TEST_F(MasterQuotaTest, DISABLED_ChildRoleSumExceedsParentQuota)
         createBasicAuthHeaders(DEFAULT_CREDENTIAL),
         createRequestBody(CHILD_ROLE2, childQuotaResources, FORCE));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response);
   }
 }
 
@@ -1771,7 +1726,7 @@ TEST_F(MasterQuotaTest, DISABLED_ChildRoleDeleteParentQuota)
         createBasicAuthHeaders(DEFAULT_CREDENTIAL),
         createRequestBody(PARENT_ROLE, parentQuotaResources, FORCE));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response) << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
   }
 
   // Set quota for the child role.
@@ -1784,8 +1739,7 @@ TEST_F(MasterQuotaTest, DISABLED_ChildRoleDeleteParentQuota)
         createBasicAuthHeaders(DEFAULT_CREDENTIAL),
         createRequestBody(CHILD_ROLE, childQuotaResources, FORCE));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
   }
 
   // Attempt to remove the quota for the parent role. This should not
@@ -1796,8 +1750,7 @@ TEST_F(MasterQuotaTest, DISABLED_ChildRoleDeleteParentQuota)
         "quota/" + PARENT_ROLE,
         createBasicAuthHeaders(DEFAULT_CREDENTIAL));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response);
   }
 }
 
@@ -1844,7 +1797,7 @@ TEST_F(MasterQuotaTest, DISABLED_ClusterCapacityWithNestedRoles)
         createBasicAuthHeaders(DEFAULT_CREDENTIAL),
         createRequestBody(PARENT_ROLE1, parent1QuotaResources));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response) << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
   }
 
   // Set quota for the child role. This should succeed, even though
@@ -1859,7 +1812,7 @@ TEST_F(MasterQuotaTest, DISABLED_ClusterCapacityWithNestedRoles)
         createBasicAuthHeaders(DEFAULT_CREDENTIAL),
         createRequestBody(CHILD_ROLE, childQuotaResources));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response) << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
   }
 
   // Set quota for the second parent role. This should succeed, even
@@ -1874,7 +1827,7 @@ TEST_F(MasterQuotaTest, DISABLED_ClusterCapacityWithNestedRoles)
         createBasicAuthHeaders(DEFAULT_CREDENTIAL),
         createRequestBody(PARENT_ROLE2, parent2QuotaResources));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response) << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
   }
 }
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/024e544f/src/tests/registrar_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/registrar_tests.cpp b/src/tests/registrar_tests.cpp
index 9caff04..210b228 100644
--- a/src/tests/registrar_tests.cpp
+++ b/src/tests/registrar_tests.cpp
@@ -1276,8 +1276,7 @@ TEST_F(RegistrarTest, Authentication)
 
   // Requests without credentials should be rejected.
   Future<Response> response = process::http::get(registrar.pid(), "registry");
-  AWAIT_EXPECT_RESPONSE_STATUS_EQ(Unauthorized({}).status, response)
-    << response->body;
+  AWAIT_EXPECT_RESPONSE_STATUS_EQ(Unauthorized({}).status, response);
 
   Credential badCredential;
   badCredential.set_principal("bad-principal");
@@ -1289,8 +1288,7 @@ TEST_F(RegistrarTest, Authentication)
       "registry",
       None(),
       createBasicAuthHeaders(badCredential));
-  AWAIT_EXPECT_RESPONSE_STATUS_EQ(Unauthorized({}).status, response)
-    << response->body;
+  AWAIT_EXPECT_RESPONSE_STATUS_EQ(Unauthorized({}).status, response);
 
   // Requests with good credentials should be permitted.
   response = process::http::get(
@@ -1298,8 +1296,7 @@ TEST_F(RegistrarTest, Authentication)
       "registry",
       None(),
       createBasicAuthHeaders(DEFAULT_CREDENTIAL));
-  AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-    << response->body;
+  AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
   AWAIT_READY(authentication::unsetAuthenticator(AUTHENTICATION_REALM));
 }

http://git-wip-us.apache.org/repos/asf/mesos/blob/024e544f/src/tests/reservation_endpoints_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/reservation_endpoints_tests.cpp b/src/tests/reservation_endpoints_tests.cpp
index 5a6e9a7..428099e 100644
--- a/src/tests/reservation_endpoints_tests.cpp
+++ b/src/tests/reservation_endpoints_tests.cpp
@@ -1616,8 +1616,7 @@ TEST_F(ReservationEndpointsTest, AgentStateEndpointResources)
       None(),
       createBasicAuthHeaders(DEFAULT_CREDENTIAL));
 
-  AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-    << response->body;
+  AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
   Try<JSON::Object> parse = JSON::parse<JSON::Object>(response->body);
   ASSERT_SOME(parse);

http://git-wip-us.apache.org/repos/asf/mesos/blob/024e544f/src/tests/resource_provider_manager_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/resource_provider_manager_tests.cpp b/src/tests/resource_provider_manager_tests.cpp
index c29b892..70d5217 100644
--- a/src/tests/resource_provider_manager_tests.cpp
+++ b/src/tests/resource_provider_manager_tests.cpp
@@ -206,8 +206,7 @@ TEST_P(ResourceProviderManagerHttpApiTest, UnsupportedContentMediaType)
 
   Future<http::Response> response = manager.api(request, None());
 
-  AWAIT_EXPECT_RESPONSE_STATUS_EQ(UnsupportedMediaType().status, response)
-    << response->body;
+  AWAIT_EXPECT_RESPONSE_STATUS_EQ(UnsupportedMediaType().status, response);
 }
 
 
@@ -240,7 +239,7 @@ TEST_P(ResourceProviderManagerHttpApiTest, Subscribe)
 
   Future<http::Response> response = manager.api(request, None());
 
-  AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response) << response->body;
+  AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
   ASSERT_EQ(http::Response::PIPE, response->type);
 
   Option<http::Pipe::Reader> reader = response->reader;

http://git-wip-us.apache.org/repos/asf/mesos/blob/024e544f/src/tests/role_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/role_tests.cpp b/src/tests/role_tests.cpp
index fc4c017..568ea90 100644
--- a/src/tests/role_tests.cpp
+++ b/src/tests/role_tests.cpp
@@ -296,8 +296,7 @@ TEST_F_TEMP_DISABLED_ON_WINDOWS(RoleTest, EndpointEmpty)
       None(),
       createBasicAuthHeaders(DEFAULT_CREDENTIAL));
 
-  AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-    << response->body;
+  AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
   AWAIT_EXPECT_RESPONSE_HEADER_EQ(APPLICATION_JSON, "Content-Type", response);
 
@@ -332,8 +331,7 @@ TEST_F(RoleTest, EndpointNoFrameworks)
       None(),
       createBasicAuthHeaders(DEFAULT_CREDENTIAL));
 
-  AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-    << response->body;
+  AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
   AWAIT_EXPECT_RESPONSE_HEADER_EQ(APPLICATION_JSON, "Content-Type", response);
 
@@ -408,8 +406,7 @@ TEST_F_TEMP_DISABLED_ON_WINDOWS(RoleTest, RolesEndpointContainsQuota)
         createBasicAuthHeaders(DEFAULT_CREDENTIAL),
         stringify(JSON::protobuf(request)));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
   }
 
   // Query the master roles endpoint and check it contains quota.
@@ -420,8 +417,7 @@ TEST_F_TEMP_DISABLED_ON_WINDOWS(RoleTest, RolesEndpointContainsQuota)
         None(),
         createBasicAuthHeaders(DEFAULT_CREDENTIAL));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
     Try<JSON::Object> parse = JSON::parse<JSON::Object>(response->body);
     ASSERT_SOME(parse);
@@ -501,8 +497,7 @@ TEST_F_TEMP_DISABLED_ON_WINDOWS(RoleTest, EndpointImplicitRolesWeights)
       None(),
       createBasicAuthHeaders(DEFAULT_CREDENTIAL));
 
-  AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-    << response->body;
+  AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
   AWAIT_EXPECT_RESPONSE_HEADER_EQ(APPLICATION_JSON, "Content-Type", response);
 
@@ -698,8 +693,7 @@ TEST_F_TEMP_DISABLED_ON_WINDOWS(
         None(),
         createBasicAuthHeaders(DEFAULT_CREDENTIAL));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
     Try<JSON::Value> parse = JSON::parse(response->body);
     ASSERT_SOME(parse);
@@ -758,8 +752,7 @@ TEST_F_TEMP_DISABLED_ON_WINDOWS(
         None(),
         createBasicAuthHeaders(DEFAULT_CREDENTIAL));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
     Try<JSON::Value> parse = JSON::parse(response->body);
     ASSERT_SOME(parse);

http://git-wip-us.apache.org/repos/asf/mesos/blob/024e544f/src/tests/slave_authorization_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/slave_authorization_tests.cpp b/src/tests/slave_authorization_tests.cpp
index 4c7d37f..868e39e 100644
--- a/src/tests/slave_authorization_tests.cpp
+++ b/src/tests/slave_authorization_tests.cpp
@@ -340,8 +340,7 @@ TYPED_TEST(SlaveAuthorizerTest, FilterStateEndpoint)
         None(),
         createBasicAuthHeaders(DEFAULT_CREDENTIAL));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
     Try<JSON::Object> parse = JSON::parse<JSON::Object>(response->body);
     ASSERT_SOME(parse);
@@ -402,8 +401,7 @@ TYPED_TEST(SlaveAuthorizerTest, FilterStateEndpoint)
         None(),
         createBasicAuthHeaders(DEFAULT_CREDENTIAL_2));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-      << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
     Try<JSON::Object> parse = JSON::parse<JSON::Object>(response->body);
     ASSERT_SOME(parse);
@@ -509,8 +507,7 @@ TYPED_TEST(SlaveAuthorizerTest, ViewFlags)
         None(),
         createBasicAuthHeaders(DEFAULT_CREDENTIAL));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-        << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
     response = http::get(
         agent.get()->pid,
@@ -518,8 +515,7 @@ TYPED_TEST(SlaveAuthorizerTest, ViewFlags)
         None(),
         createBasicAuthHeaders(DEFAULT_CREDENTIAL));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-        << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
     Try<JSON::Object> parse = JSON::parse<JSON::Object>(response->body);
     ASSERT_SOME(parse);
@@ -538,8 +534,7 @@ TYPED_TEST(SlaveAuthorizerTest, ViewFlags)
         None(),
         createBasicAuthHeaders(DEFAULT_CREDENTIAL_2));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(Forbidden().status, response)
-        << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(Forbidden().status, response);
 
     response = http::get(
         agent.get()->pid,
@@ -547,8 +542,7 @@ TYPED_TEST(SlaveAuthorizerTest, ViewFlags)
         None(),
         createBasicAuthHeaders(DEFAULT_CREDENTIAL_2));
 
-    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-        << response->body;
+    AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
     Try<JSON::Object> parse = JSON::parse<JSON::Object>(response->body);
     ASSERT_SOME(parse);
@@ -1311,8 +1305,7 @@ TEST_P(SlaveEndpointTest, AuthorizedRequest)
 
   EXPECT_EQ("/" + endpoint, request->object().value());
 
-  AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-    << response->body;
+  AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 }
 
 
@@ -1346,8 +1339,7 @@ TEST_P(SlaveEndpointTest, UnauthorizedRequest)
       None(),
       createBasicAuthHeaders(DEFAULT_CREDENTIAL));
 
-  AWAIT_EXPECT_RESPONSE_STATUS_EQ(Forbidden().status, response)
-    << response->body;
+  AWAIT_EXPECT_RESPONSE_STATUS_EQ(Forbidden().status, response);
 }
 
 
@@ -1377,8 +1369,7 @@ TEST_P(SlaveEndpointTest, NoAuthorizer)
       None(),
       createBasicAuthHeaders(DEFAULT_CREDENTIAL));
 
-  AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-    << response->body;
+  AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 }
 
 } // namespace tests {

http://git-wip-us.apache.org/repos/asf/mesos/blob/024e544f/src/tests/slave_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/slave_tests.cpp b/src/tests/slave_tests.cpp
index 6d1e98d..91d97d1 100644
--- a/src/tests/slave_tests.cpp
+++ b/src/tests/slave_tests.cpp
@@ -2448,8 +2448,7 @@ TEST_F(SlaveTest, StatisticsEndpointAuthentication)
           agent.get()->pid,
           statisticsEndpoint);
 
-      AWAIT_EXPECT_RESPONSE_STATUS_EQ(Unauthorized({}).status, response)
-          << response->body;
+      AWAIT_EXPECT_RESPONSE_STATUS_EQ(Unauthorized({}).status, response);
     }
 
     // Incorrectly authenticated requests are rejected.
@@ -2464,8 +2463,7 @@ TEST_F(SlaveTest, StatisticsEndpointAuthentication)
           None(),
           createBasicAuthHeaders(badCredential));
 
-      AWAIT_EXPECT_RESPONSE_STATUS_EQ(Unauthorized({}).status, response)
-          << response->body;
+      AWAIT_EXPECT_RESPONSE_STATUS_EQ(Unauthorized({}).status, response);
     }
 
     // Correctly authenticated requests succeed.
@@ -2476,8 +2474,7 @@ TEST_F(SlaveTest, StatisticsEndpointAuthentication)
           None(),
           createBasicAuthHeaders(DEFAULT_CREDENTIAL));
 
-      AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response)
-          << response->body;
+      AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
     }
   }
 }