> On April 20, 2016, 10:35 a.m., Adam B wrote:
> > src/tests/slave_authorization_tests.cpp, lines 110-114
> > <https://reviews.apache.org/r/46203/diff/9/?file=1350395#file1350395line110>
> >
> >     This seems wrong. You don't even bother to reset the authenticator 
> > after you're done?
> >     Why do you even need to unset the authenticator when you already set 
> > `slaveFlags.authenticate_http = false`?
> 
> Jan Schlicht wrote:
>     Unfortunately the libprocess environment is shared between tests. An 
> agent sets the libprocess-wide authenticator when initialized but doesn't 
> unset it -- which is good, because otherwise tests instanciating multiple 
> agents may not work correctly. As a consequence, the authenticator may still 
> be set when this test case is started, forcing us to have to explicitly unset 
> it here.
> 
> Adam B wrote:
>     And then you don't need to reset it at the end of this test because the 
> next agent that starts will set it anew?
> 
> Jan Schlicht wrote:
>     Yes, exactly so.
>     But resetting it would be the right way, i.e. all tests should do it like 
> that. Then we wouldn't need to unset it here. That's what's done for the 
> master in `cluster.cpp` (see `Master::~Master`) but it would restrict us to 
> using a single agent in the tests. Better would be something like a reference 
> pointed pointer to some object that unsets the authenticator after all agents 
> used in the test have been destroyed.

s/reference pointed pointer/reference counted pointer/ ... = `std::shared_ptr`.


- Jan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46203/#review129696
-----------------------------------------------------------


On April 22, 2016, 12:12 p.m., Jan Schlicht wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46203/
> -----------------------------------------------------------
> 
> (Updated April 22, 2016, 12:12 p.m.)
> 
> 
> Review request for mesos, Adam B, Alexander Rojas, and Benjamin Bannier.
> 
> 
> Bugs: MESOS-5142
>     https://issues.apache.org/jira/browse/MESOS-5142
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added authorization of the '/flags' endpoint.
> 
> 
> Diffs
> -----
> 
>   docs/configuration.md 86ba66ac62295ca148524bcb2e57fee560ac4ac5 
>   include/mesos/authorizer/acls.proto 
> c50deeb5565dfd5b3e5e7210283d9a36a3bfd579 
>   include/mesos/authorizer/authorizer.proto 
> 40d93ea257d1df8d22eee8a21667db90d579a8fe 
>   src/Makefile.am e024c6d65608a55765e527a8668c415723dcfcca 
>   src/authorizer/local/authorizer.cpp 
> c744a16041c2466d3839a37fbee2bf86887bf4e1 
>   src/slave/flags.cpp 10d2974bd2b6e79255fc894979607f0d2d00c315 
>   src/slave/http.cpp f887a71684304a82ff0d81dbd240e29aa7e2ac67 
>   src/slave/slave.hpp 20a4bcd0bb9dad06ea81fc4ad9b2fa462c69d2c5 
>   src/tests/slave_authorization_tests.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/46203/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jan Schlicht
> 
>

Reply via email to