Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
When Mesos agents are started with enabled authentication, the call process::http::authentication::setAuthenticator to enable the HTTP authenticator on libprocess level. This authenticator is never unset, which is fine for the general use case, because libprocess's lifetime is tied to the agent's lifetime.
In a test fixture the situation is different, though. The lifetime of libprocess is tied to the lifetime of the fixture. As a consequence, a test case that wants to disable HTTP authentication of an agent needs to manually unset the authenticator as it already may have been set by a different test case of the fixture.
The naive solution would be to add the unset call to cluster::Slave::~Slave but that could cause problems in test cases with multiple slaves. A better solution would be to unset the HTTP authenticator during the teardown of a test case that used agents with enabled HTTP authentication.