MCPcopy Create free account
hub / github.com/apache/mesos / TEST_F

Function TEST_F

src/tests/resource_provider_manager_tests.cpp:122–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120
121
122TEST_F(ResourceProviderManagerHttpApiTest, NoContentType)
123{
124 http::Request request;
125 request.method = "POST";
126 request.headers = createBasicAuthHeaders(DEFAULT_CREDENTIAL);
127
128 ResourceProviderManager manager(
129 Registrar::create(Owned<Storage>(new InMemoryStorage)).get());
130
131 Future<http::Response> response = manager.api(request, None());
132
133 AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response);
134 AWAIT_EXPECT_RESPONSE_BODY_EQ(
135 "Expecting 'Content-Type' to be present",
136 response);
137}
138
139
140// This test sends a valid JSON blob that cannot be deserialized

Callers

nothing calls this directly

Calls 15

createBasicAuthHeadersFunction · 0.85
NoneClass · 0.85
BadRequestClass · 0.85
createEndpointDetectorFunction · 0.85
randomFunction · 0.85
InvokeClass · 0.85
FutureSatisfyFunction · 0.85
OKClass · 0.85
createDetectorMethod · 0.80
CopyFromMethod · 0.80
toBytesMethod · 0.80
failureMethod · 0.80

Tested by

no test coverage detected