mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Mann <g...@mesosphere.io>
Subject Re: Review Request 46876: Fixed tests to work with authorized '/metrics/snapshot'.
Date Thu, 05 May 2016 18:54:32 GMT


> On May 4, 2016, 3:24 a.m., Kapil Arya wrote:
> > src/tests/scheduler_driver_tests.cpp, line 99
> > <https://reviews.apache.org/r/46876/diff/1/?file=1368191#file1368191line99>
> >
> >     Why this change?

This test broke with the new changes, and after looking at the HTTP handling code again, it
seems that we allow any number of forward slashes in between the `pid.id` and the rest of
the endpoint path. Not sure if this is intentional, but I've altered the code in https://reviews.apache.org/r/46989/
to use the same logic for mapping the path to an authorization callback. This means this test
works again without this change, so I've reverted the change highlighted in this comment.

The double-slash isn't strictly compliant with the HTTP spec (https://tools.ietf.org/html/rfc3986#section-3.3),
so I would imagine we don't want to allow that. I'll look into it and create a ticket if necessary.


- Greg


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


On May 5, 2016, 6:40 p.m., Greg Mann wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46876/
> -----------------------------------------------------------
> 
> (Updated May 5, 2016, 6:40 p.m.)
> 
> 
> Review request for mesos, Alexander Rojas and Kapil Arya.
> 
> 
> Bugs: MESOS-5286
>     https://issues.apache.org/jira/browse/MESOS-5286
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Some tests hit the '/metrics/snapshot' endpoint and
> must be updated to accomodate authorization. In
> particular, an authorizer had to be explicitly
> instantiated and used to initialize the master/agent
> in some tests so that they share the same authorizer.
> 
> 
> Diffs
> -----
> 
>   src/tests/master_authorization_tests.cpp 804b39a269c09df9f6c0bbdf6f8b53921ac09ce8 
>   src/tests/mesos.hpp 0f6f541c5d2007a69ad5bd6e884235cd3c0c1be2 
>   src/tests/mesos.cpp 036c589f5aafc8c804b0fb4e5ad62df70e471e88 
>   src/tests/partition_tests.cpp 3ec51cedcea9c7ed5cf41e9e0087fc044c85d2f1 
>   src/tests/slave_tests.cpp 3f653354869987dce3f5fbc4513b6f3466a718cb 
> 
> Diff: https://reviews.apache.org/r/46876/diff/
> 
> 
> Testing
> -------
> 
> `make check` on OSX.
> 
> 
> Thanks,
> 
> Greg Mann
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message