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:24 UTC
[05/14] mesos git commit: Fixed formatting of
`AWAIT_EXPECT_RESPONSE_STATUS_EQ`.
Fixed formatting of `AWAIT_EXPECT_RESPONSE_STATUS_EQ`.
Review: https://reviews.apache.org/r/63006
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/e9edc915
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/e9edc915
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/e9edc915
Branch: refs/heads/master
Commit: e9edc915ea6d7c305ec8a3c7cb298327b7a961db
Parents: 4fd9981
Author: Alexander Rukletsov <al...@apache.org>
Authored: Wed Oct 11 20:19:06 2017 -0700
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Mon Oct 16 17:02:48 2017 -0700
----------------------------------------------------------------------
src/tests/master_tests.cpp | 6 ++---
src/tests/persistent_volume_endpoints_tests.cpp | 24 +++++---------------
src/tests/reservation_endpoints_tests.cpp | 16 ++++---------
3 files changed, 12 insertions(+), 34 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/e9edc915/src/tests/master_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_tests.cpp b/src/tests/master_tests.cpp
index 4c77601..cf17768 100644
--- a/src/tests/master_tests.cpp
+++ b/src/tests/master_tests.cpp
@@ -4928,8 +4928,7 @@ TEST_F(MasterTest, RecoveredSlaves)
createBasicAuthHeaders(DEFAULT_CREDENTIAL));
AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
- AWAIT_EXPECT_RESPONSE_HEADER_EQ(
- APPLICATION_JSON, "Content-Type", response);
+ AWAIT_EXPECT_RESPONSE_HEADER_EQ(APPLICATION_JSON, "Content-Type", response);
Try<JSON::Object> parse = JSON::parse<JSON::Object>(response->body);
@@ -4952,8 +4951,7 @@ TEST_F(MasterTest, RecoveredSlaves)
createBasicAuthHeaders(DEFAULT_CREDENTIAL));
AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);;
- AWAIT_EXPECT_RESPONSE_HEADER_EQ(
- APPLICATION_JSON, "Content-Type", response);
+ AWAIT_EXPECT_RESPONSE_HEADER_EQ(APPLICATION_JSON, "Content-Type", response);
Try<JSON::Object> parse = JSON::parse<JSON::Object>(response->body);
http://git-wip-us.apache.org/repos/asf/mesos/blob/e9edc915/src/tests/persistent_volume_endpoints_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/persistent_volume_endpoints_tests.cpp b/src/tests/persistent_volume_endpoints_tests.cpp
index 7a24bf4..97b7c99 100644
--- a/src/tests/persistent_volume_endpoints_tests.cpp
+++ b/src/tests/persistent_volume_endpoints_tests.cpp
@@ -715,9 +715,7 @@ TEST_F(PersistentVolumeEndpointsTest, NoHeader)
None(),
createRequestBody(slaveId, "volumes", volume));
- AWAIT_EXPECT_RESPONSE_STATUS_EQ(
- Unauthorized({}).status,
- response);
+ AWAIT_EXPECT_RESPONSE_STATUS_EQ(Unauthorized({}).status, response);
response = process::http::post(
master.get()->pid,
@@ -725,9 +723,7 @@ TEST_F(PersistentVolumeEndpointsTest, NoHeader)
None(),
createRequestBody(slaveId, "volumes", volume));
- AWAIT_EXPECT_RESPONSE_STATUS_EQ(
- Unauthorized({}).status,
- response);
+ AWAIT_EXPECT_RESPONSE_STATUS_EQ(Unauthorized({}).status, response);
}
@@ -770,16 +766,12 @@ TEST_F(PersistentVolumeEndpointsTest, BadCredentials)
Future<Response> response =
process::http::post(master.get()->pid, "create-volumes", headers, body);
- AWAIT_EXPECT_RESPONSE_STATUS_EQ(
- Unauthorized({}).status,
- response);
+ AWAIT_EXPECT_RESPONSE_STATUS_EQ(Unauthorized({}).status, response);
response =
process::http::post(master.get()->pid, "destroy-volumes", headers, body);
- AWAIT_EXPECT_RESPONSE_STATUS_EQ(
- Unauthorized({}).status,
- response);
+ AWAIT_EXPECT_RESPONSE_STATUS_EQ(Unauthorized({}).status, response);
}
@@ -1268,9 +1260,7 @@ TEST_F(PersistentVolumeEndpointsTest, GoodCreateAndDestroyACLBadCredential)
createBasicAuthHeaders(failedCredential),
createRequestBody(slaveId, "volumes", volume));
- AWAIT_EXPECT_RESPONSE_STATUS_EQ(
- Unauthorized({}).status,
- createResponse);
+ AWAIT_EXPECT_RESPONSE_STATUS_EQ(Unauthorized({}).status, createResponse);
// The successful creation attempt.
createResponse = process::http::post(
@@ -1314,9 +1304,7 @@ TEST_F(PersistentVolumeEndpointsTest, GoodCreateAndDestroyACLBadCredential)
createBasicAuthHeaders(failedCredential),
createRequestBody(slaveId, "volumes", volume));
- AWAIT_EXPECT_RESPONSE_STATUS_EQ(
- Unauthorized({}).status,
- destroyResponse);
+ AWAIT_EXPECT_RESPONSE_STATUS_EQ(Unauthorized({}).status, destroyResponse);
driver.stop();
driver.join();
http://git-wip-us.apache.org/repos/asf/mesos/blob/e9edc915/src/tests/reservation_endpoints_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/reservation_endpoints_tests.cpp b/src/tests/reservation_endpoints_tests.cpp
index 428099e..e3244ac 100644
--- a/src/tests/reservation_endpoints_tests.cpp
+++ b/src/tests/reservation_endpoints_tests.cpp
@@ -896,9 +896,7 @@ TEST_F(ReservationEndpointsTest, NoHeader)
None(),
createRequestBody(slaveId, dynamicallyReserved));
- AWAIT_EXPECT_RESPONSE_STATUS_EQ(
- Unauthorized({}).status,
- response);
+ AWAIT_EXPECT_RESPONSE_STATUS_EQ(Unauthorized({}).status, response);
response = process::http::post(
master.get()->pid,
@@ -906,9 +904,7 @@ TEST_F(ReservationEndpointsTest, NoHeader)
None(),
createRequestBody(slaveId, dynamicallyReserved));
- AWAIT_EXPECT_RESPONSE_STATUS_EQ(
- Unauthorized({}).status,
- response);
+ AWAIT_EXPECT_RESPONSE_STATUS_EQ(Unauthorized({}).status, response);
}
@@ -943,15 +939,11 @@ TEST_F(ReservationEndpointsTest, BadCredentials)
Future<Response> response =
process::http::post(master.get()->pid, "reserve", headers, body);
- AWAIT_EXPECT_RESPONSE_STATUS_EQ(
- Unauthorized({}).status,
- response);
+ AWAIT_EXPECT_RESPONSE_STATUS_EQ(Unauthorized({}).status, response);
response = process::http::post(master.get()->pid, "unreserve", headers, body);
- AWAIT_EXPECT_RESPONSE_STATUS_EQ(
- Unauthorized({}).status,
- response);
+ AWAIT_EXPECT_RESPONSE_STATUS_EQ(Unauthorized({}).status, response);
}