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

Function TEST_F

3rdparty/libprocess/src/tests/http_tests.cpp:1963–1974  ·  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

1961// Ensures that when there is no authenticator for a realm,
1962// requests are not authenticated (i.e. the principal is None).
1963TEST_F(HttpAuthenticationTest, NoAuthenticator)
1964{
1965 Http http;
1966
1967 EXPECT_CALL(*http.process, authenticated(_, Option<Principal>::none()))
1968 .WillOnce(Return(http::OK()));
1969
1970 Future<http::Response> response =
1971 http::get(http.process->self(), "authenticated");
1972
1973 AWAIT_EXPECT_RESPONSE_STATUS_EQ(http::OK().status, response);
1974}
1975
1976
1977// Tests that an authentication Unauthorized result is exposed correctly.

Callers

nothing calls this directly

Calls 15

OKClass · 0.85
setAuthenticatorFunction · 0.85
UnauthorizedClass · 0.85
ForbiddenClass · 0.85
NoneClass · 0.85
InternalServerErrorClass · 0.85
FailureClass · 0.85
lookup_hostnameMethod · 0.80
hasDiscardMethod · 0.80
readAllMethod · 0.80
sendMethod · 0.65
disconnectedMethod · 0.65

Tested by

no test coverage detected