MCPcopy Create free account
hub / github.com/3rdparty/libprocess / TEST_F

Function TEST_F

src/tests/http_tests.cpp:1862–1873  ·  view source on GitHub ↗

Ensures that when there is no authenticator for a realm, requests are not authenticated (i.e. the principal is None).

Source from the content-addressed store, hash-verified

1860// Ensures that when there is no authenticator for a realm,
1861// requests are not authenticated (i.e. the principal is None).
1862TEST_F(HttpAuthenticationTest, NoAuthenticator)
1863{
1864 Http http;
1865
1866 EXPECT_CALL(*http.process, authenticated(_, Option<Principal>::none()))
1867 .WillOnce(Return(http::OK()));
1868
1869 Future<http::Response> response =
1870 http::get(http.process->self(), "authenticated");
1871
1872 AWAIT_EXPECT_RESPONSE_STATUS_EQ(http::OK().status, response);
1873}
1874
1875
1876// Tests that an authentication Unauthorized result is exposed correctly.

Callers

nothing calls this directly

Calls 15

OKClass · 0.85
getFunction · 0.85
setAuthenticatorFunction · 0.85
UnauthorizedClass · 0.85
ForbiddenClass · 0.85
InternalServerErrorClass · 0.85
URLClass · 0.85
FailureClass · 0.85
selfMethod · 0.80
futureMethod · 0.80
lookup_hostnameMethod · 0.80
isPendingMethod · 0.80

Tested by

no test coverage detected