> On March 3, 2015, 12:42 p.m., Joerg Schad wrote: > > 3rdparty/libprocess/src/tests/process_tests.cpp, line 1928 > > <https://reviews.apache.org/r/31228/diff/4/?file=882865#file882865line1928> > > > > I like this RAII style for setting Environment variables. Would it make > > sense to have something more general (i.e. for settings other env variables > > as well) in test/utils?
I added a todo in order to make this solution more general if the need arises. However, right now these tests are the only code doing test on values over the environment variables, and as mentioned by BenH, we try to go for a local solution unless the opposite is needed. > On March 3, 2015, 12:42 p.m., Joerg Schad wrote: > > 3rdparty/libprocess/src/tests/process_tests.cpp, line 1931 > > <https://reviews.apache.org/r/31228/diff/4/?file=882865#file882865line1931> > > > > Could we make the parameter name more specific? Such as > > _disabledEndpoints or someting similar? As a general rule, our code goes for the most concise names rather than long, and the parameter is actually a list of patterns. Still, I added a comment indicating what patters are. - Alexander ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/31228/#review74935 ----------------------------------------------------------- On March 3, 2015, 3:10 p.m., Alexander Rojas wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/31228/ > ----------------------------------------------------------- > > (Updated March 3, 2015, 3:10 p.m.) > > > Review request for mesos, Joerg Schad, Niklas Nielsen, and Till Toenshoff. > > > Bugs: MESOS-2333 > https://issues.apache.org/jira/browse/MESOS-2333 > > > Repository: mesos > > > Description > ------- > > Adds a mechanism for disabling http endpoints (e.g > `testprocess/handler1,processname(*)/*`). A list of coma separated strings > can be provided using the environment variable > `LIBPROCESS_DISABLED_ENDPOINTS` which will be read during libprocess > initialization. Then, when creating http endpoints (using the method `route`) > the endpoint path will be checked against the patterns. If a match is found > the endpoint handler will be replaced for a generic once which returns a 403 > HTTP Error (Forbidden). > > > Diffs > ----- > > 3rdparty/libprocess/include/process/process.hpp > 392c74df3e8a122aecd3633dffdeec4bcbd1f097 > 3rdparty/libprocess/src/process.cpp > 6f9a0d290de6838c20d208266b670999186e1798 > 3rdparty/libprocess/src/tests/process_tests.cpp > eb38edce2c483ba7f963a826893a15a075238618 > > Diff: https://reviews.apache.org/r/31228/diff/ > > > Testing > ------- > > > Thanks, > > Alexander Rojas > >