You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Greg Mann <gr...@mesosphere.io> on 2017/02/09 01:03:06 UTC

Review Request 56475: Added libprocess tests for multiple authenticators.

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

Review request for mesos, Alexander Rojas, Jan Schlicht, Till Toenshoff, and Vinod Kone.


Bugs: MESOS-7004
    https://issues.apache.org/jira/browse/MESOS-7004


Repository: mesos


Description
-------

This patch adds the following libprocess tests to ensure
correct behavior when multiple authenticators are loaded
for a single realm:
  HttpAuthenticationTest.UnauthorizedMultipleAuthenticators
  HttpAuthenticationTest.ForbiddenMultipleAuthenticators
  HttpAuthenticationTest.AuthenticatedMultipleAuthenticators


Diffs
-----

  3rdparty/libprocess/src/tests/http_tests.cpp fb4da9aecff0370d97a15269c5d8fffb30e0478f 

Diff: https://reviews.apache.org/r/56475/diff/


Testing
-------

The following commands were used to test:
`make check`
`3rdparty/libprocess/libprocess-tests --gtest_filter="*MultipleAuthenticators*" --gtest_repeat=10000`


Thanks,

Greg Mann


Re: Review Request 56475: Added a test for the 'CombinedAuthenticator'.

Posted by Greg Mann <gr...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56475/#review168663
-----------------------------------------------------------




src/tests/http_authentication_tests.cpp
Lines 295-298 (patched)
<https://reviews.apache.org/r/56475/#comment240941>

    Factor this out above



src/tests/http_authentication_tests.cpp
Lines 318-320 (patched)
<https://reviews.apache.org/r/56475/#comment240945>

    Could add helper to construct the results for mock authenticators



src/tests/http_authentication_tests.cpp
Lines 342-343 (patched)
<https://reviews.apache.org/r/56475/#comment240940>

    Construct these using member `scheme` from mock authenticators?



src/tests/http_authentication_tests.cpp
Lines 407 (patched)
<https://reviews.apache.org/r/56475/#comment240922>

    Multiple empty


- Greg Mann


On March 10, 2017, 12:35 a.m., Greg Mann wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56475/
> -----------------------------------------------------------
> 
> (Updated March 10, 2017, 12:35 a.m.)
> 
> 
> Review request for mesos, Alexander Rojas, Jan Schlicht, Till Toenshoff, and Vinod Kone.
> 
> 
> Bugs: MESOS-7004
>     https://issues.apache.org/jira/browse/MESOS-7004
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch adds a unit test to verify the functionality of
> the `CombinedAuthenticator`. The new test is called
> `CombinedAuthenticatorTest.MultipleAuthenticators`.
> 
> 
> Diffs
> -----
> 
>   src/tests/http_authentication_tests.cpp d5fabf0058755502f19eb6385bd99a0d45419508 
> 
> 
> Diff: https://reviews.apache.org/r/56475/diff/3/
> 
> 
> Testing
> -------
> 
> The following commands were used to test:
> `make check`
> `bin/mesos-tests.sh --gtest_filter="*CombinedAuthenticator*" --gtest_repeat=-1 --gtest_break_on_failure`
> 
> 
> Thanks,
> 
> Greg Mann
> 
>


Re: Review Request 56475: Added a test for the 'CombinedAuthenticator'.

Posted by Mesos Reviewbot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56475/#review168603
-----------------------------------------------------------



Patch looks great!

Reviews applied: [56474, 56476, 56475]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker-build.sh

- Mesos Reviewbot


On March 10, 2017, 12:35 a.m., Greg Mann wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56475/
> -----------------------------------------------------------
> 
> (Updated March 10, 2017, 12:35 a.m.)
> 
> 
> Review request for mesos, Alexander Rojas, Jan Schlicht, Till Toenshoff, and Vinod Kone.
> 
> 
> Bugs: MESOS-7004
>     https://issues.apache.org/jira/browse/MESOS-7004
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch adds a unit test to verify the functionality of
> the `CombinedAuthenticator`. The new test is called
> `CombinedAuthenticatorTest.MultipleAuthenticators`.
> 
> 
> Diffs
> -----
> 
>   src/tests/http_authentication_tests.cpp d5fabf0058755502f19eb6385bd99a0d45419508 
> 
> 
> Diff: https://reviews.apache.org/r/56475/diff/3/
> 
> 
> Testing
> -------
> 
> The following commands were used to test:
> `make check`
> `bin/mesos-tests.sh --gtest_filter="*CombinedAuthenticator*" --gtest_repeat=-1 --gtest_break_on_failure`
> 
> 
> Thanks,
> 
> Greg Mann
> 
>


Re: Review Request 56475: Added a test for the 'CombinedAuthenticator'.

Posted by Vinod Kone <vi...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56475/#review169006
-----------------------------------------------------------


Fix it, then Ship it!





src/tests/http_authentication_tests.cpp
Lines 284-286 (patched)
<https://reviews.apache.org/r/56475/#comment241337>

    can you not use the `Unauthorized` constructor that takes 2 arguments?



src/tests/http_authentication_tests.cpp
Lines 315-316 (patched)
<https://reviews.apache.org/r/56475/#comment241338>

    ditto. use 2 arg constructor?



src/tests/http_authentication_tests.cpp
Lines 379 (patched)
<https://reviews.apache.org/r/56475/#comment241339>

    // The first authenticator fails but the second one succeeds.



src/tests/http_authentication_tests.cpp
Lines 533 (patched)
<https://reviews.apache.org/r/56475/#comment241341>

    nice test!


- Vinod Kone


On March 14, 2017, 5:07 p.m., Greg Mann wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56475/
> -----------------------------------------------------------
> 
> (Updated March 14, 2017, 5:07 p.m.)
> 
> 
> Review request for mesos, Alexander Rojas, Jan Schlicht, Till Toenshoff, and Vinod Kone.
> 
> 
> Bugs: MESOS-7004
>     https://issues.apache.org/jira/browse/MESOS-7004
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch adds a unit test to verify the functionality of
> the `CombinedAuthenticator`. The new test is called
> `CombinedAuthenticatorTest.MultipleAuthenticators`.
> 
> 
> Diffs
> -----
> 
>   src/tests/http_authentication_tests.cpp 0eeed9d19881cf3fa5fec7fb7fedc1e92784f58b 
> 
> 
> Diff: https://reviews.apache.org/r/56475/diff/5/
> 
> 
> Testing
> -------
> 
> The following commands were used to test:
> `make check`
> `bin/mesos-tests.sh --gtest_filter="*CombinedAuthenticator*" --gtest_repeat=-1 --gtest_break_on_failure`
> 
> 
> Thanks,
> 
> Greg Mann
> 
>


Re: Review Request 56475: Added a test for the 'CombinedAuthenticator'.

Posted by Vinod Kone <vi...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56475/#review169040
-----------------------------------------------------------


Ship it!




Ship It!

- Vinod Kone


On March 15, 2017, 6:20 p.m., Greg Mann wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56475/
> -----------------------------------------------------------
> 
> (Updated March 15, 2017, 6:20 p.m.)
> 
> 
> Review request for mesos, Alexander Rojas, Jan Schlicht, Till Toenshoff, and Vinod Kone.
> 
> 
> Bugs: MESOS-7004
>     https://issues.apache.org/jira/browse/MESOS-7004
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch adds a unit test to verify the functionality of
> the `CombinedAuthenticator`. The new test is called
> `CombinedAuthenticatorTest.MultipleAuthenticators`.
> 
> 
> Diffs
> -----
> 
>   src/tests/http_authentication_tests.cpp 0eeed9d19881cf3fa5fec7fb7fedc1e92784f58b 
> 
> 
> Diff: https://reviews.apache.org/r/56475/diff/6/
> 
> 
> Testing
> -------
> 
> The following commands were used to test:
> `make check`
> `bin/mesos-tests.sh --gtest_filter="*CombinedAuthenticator*" --gtest_repeat=-1 --gtest_break_on_failure`
> 
> 
> Thanks,
> 
> Greg Mann
> 
>


Re: Review Request 56475: Added a test for the 'CombinedAuthenticator'.

Posted by Greg Mann <gr...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56475/
-----------------------------------------------------------

(Updated March 15, 2017, 6:20 p.m.)


Review request for mesos, Alexander Rojas, Jan Schlicht, Till Toenshoff, and Vinod Kone.


Changes
-------

Addressed comments.


Bugs: MESOS-7004
    https://issues.apache.org/jira/browse/MESOS-7004


Repository: mesos


Description
-------

This patch adds a unit test to verify the functionality of
the `CombinedAuthenticator`. The new test is called
`CombinedAuthenticatorTest.MultipleAuthenticators`.


Diffs (updated)
-----

  src/tests/http_authentication_tests.cpp 0eeed9d19881cf3fa5fec7fb7fedc1e92784f58b 


Diff: https://reviews.apache.org/r/56475/diff/6/

Changes: https://reviews.apache.org/r/56475/diff/5-6/


Testing
-------

The following commands were used to test:
`make check`
`bin/mesos-tests.sh --gtest_filter="*CombinedAuthenticator*" --gtest_repeat=-1 --gtest_break_on_failure`


Thanks,

Greg Mann


Re: Review Request 56475: Added a test for the 'CombinedAuthenticator'.

Posted by Mesos Reviewbot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56475/#review168925
-----------------------------------------------------------



Patch looks great!

Reviews applied: [56474, 56476, 56475]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker-build.sh

- Mesos Reviewbot


On March 14, 2017, 10:07 a.m., Greg Mann wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56475/
> -----------------------------------------------------------
> 
> (Updated March 14, 2017, 10:07 a.m.)
> 
> 
> Review request for mesos, Alexander Rojas, Jan Schlicht, Till Toenshoff, and Vinod Kone.
> 
> 
> Bugs: MESOS-7004
>     https://issues.apache.org/jira/browse/MESOS-7004
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch adds a unit test to verify the functionality of
> the `CombinedAuthenticator`. The new test is called
> `CombinedAuthenticatorTest.MultipleAuthenticators`.
> 
> 
> Diffs
> -----
> 
>   src/tests/http_authentication_tests.cpp 0eeed9d19881cf3fa5fec7fb7fedc1e92784f58b 
> 
> 
> Diff: https://reviews.apache.org/r/56475/diff/5/
> 
> 
> Testing
> -------
> 
> The following commands were used to test:
> `make check`
> `bin/mesos-tests.sh --gtest_filter="*CombinedAuthenticator*" --gtest_repeat=-1 --gtest_break_on_failure`
> 
> 
> Thanks,
> 
> Greg Mann
> 
>


Re: Review Request 56475: Added a test for the 'CombinedAuthenticator'.

Posted by Greg Mann <gr...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56475/
-----------------------------------------------------------

(Updated March 14, 2017, 5:07 p.m.)


Review request for mesos, Alexander Rojas, Jan Schlicht, Till Toenshoff, and Vinod Kone.


Changes
-------

Rebase.


Bugs: MESOS-7004
    https://issues.apache.org/jira/browse/MESOS-7004


Repository: mesos


Description
-------

This patch adds a unit test to verify the functionality of
the `CombinedAuthenticator`. The new test is called
`CombinedAuthenticatorTest.MultipleAuthenticators`.


Diffs (updated)
-----

  src/tests/http_authentication_tests.cpp 0eeed9d19881cf3fa5fec7fb7fedc1e92784f58b 


Diff: https://reviews.apache.org/r/56475/diff/5/

Changes: https://reviews.apache.org/r/56475/diff/4-5/


Testing
-------

The following commands were used to test:
`make check`
`bin/mesos-tests.sh --gtest_filter="*CombinedAuthenticator*" --gtest_repeat=-1 --gtest_break_on_failure`


Thanks,

Greg Mann


Re: Review Request 56475: Added a test for the 'CombinedAuthenticator'.

Posted by Mesos Reviewbot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56475/#review168866
-----------------------------------------------------------



Bad patch!

Reviews applied: [56475, 56476, 56474]

Failed command: python support/apply-reviews.py -n -r 56474

Error:
2017-03-14 05:52:05 URL:https://reviews.apache.org/r/56474/diff/raw/ [18630/18630] -> "56474.patch" [1]
error: patch failed: src/Makefile.am:560
error: src/Makefile.am: patch does not apply

Full log: https://builds.apache.org/job/Mesos-Reviewbot/17423/console

- Mesos Reviewbot


On March 14, 2017, 5:34 a.m., Greg Mann wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56475/
> -----------------------------------------------------------
> 
> (Updated March 14, 2017, 5:34 a.m.)
> 
> 
> Review request for mesos, Alexander Rojas, Jan Schlicht, Till Toenshoff, and Vinod Kone.
> 
> 
> Bugs: MESOS-7004
>     https://issues.apache.org/jira/browse/MESOS-7004
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch adds a unit test to verify the functionality of
> the `CombinedAuthenticator`. The new test is called
> `CombinedAuthenticatorTest.MultipleAuthenticators`.
> 
> 
> Diffs
> -----
> 
>   src/tests/http_authentication_tests.cpp d5fabf0058755502f19eb6385bd99a0d45419508 
> 
> 
> Diff: https://reviews.apache.org/r/56475/diff/4/
> 
> 
> Testing
> -------
> 
> The following commands were used to test:
> `make check`
> `bin/mesos-tests.sh --gtest_filter="*CombinedAuthenticator*" --gtest_repeat=-1 --gtest_break_on_failure`
> 
> 
> Thanks,
> 
> Greg Mann
> 
>


Re: Review Request 56475: Added a test for the 'CombinedAuthenticator'.

Posted by Greg Mann <gr...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56475/
-----------------------------------------------------------

(Updated March 14, 2017, 5:34 a.m.)


Review request for mesos, Alexander Rojas, Jan Schlicht, Till Toenshoff, and Vinod Kone.


Changes
-------

Addressed comments.


Bugs: MESOS-7004
    https://issues.apache.org/jira/browse/MESOS-7004


Repository: mesos


Description
-------

This patch adds a unit test to verify the functionality of
the `CombinedAuthenticator`. The new test is called
`CombinedAuthenticatorTest.MultipleAuthenticators`.


Diffs (updated)
-----

  src/tests/http_authentication_tests.cpp d5fabf0058755502f19eb6385bd99a0d45419508 


Diff: https://reviews.apache.org/r/56475/diff/4/

Changes: https://reviews.apache.org/r/56475/diff/3-4/


Testing
-------

The following commands were used to test:
`make check`
`bin/mesos-tests.sh --gtest_filter="*CombinedAuthenticator*" --gtest_repeat=-1 --gtest_break_on_failure`


Thanks,

Greg Mann


Re: Review Request 56475: Added a test for the 'CombinedAuthenticator'.

Posted by Greg Mann <gr...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56475/
-----------------------------------------------------------

(Updated March 10, 2017, 12:35 a.m.)


Review request for mesos, Alexander Rojas, Jan Schlicht, Till Toenshoff, and Vinod Kone.


Bugs: MESOS-7004
    https://issues.apache.org/jira/browse/MESOS-7004


Repository: mesos


Description
-------

This patch adds a unit test to verify the functionality of
the `CombinedAuthenticator`. The new test is called
`CombinedAuthenticatorTest.MultipleAuthenticators`.


Diffs (updated)
-----

  src/tests/http_authentication_tests.cpp d5fabf0058755502f19eb6385bd99a0d45419508 


Diff: https://reviews.apache.org/r/56475/diff/3/

Changes: https://reviews.apache.org/r/56475/diff/2-3/


Testing
-------

The following commands were used to test:
`make check`
`bin/mesos-tests.sh --gtest_filter="*CombinedAuthenticator*" --gtest_repeat=-1 --gtest_break_on_failure`


Thanks,

Greg Mann


Re: Review Request 56475: Added a test for the 'CombinedAuthenticator'.

Posted by Greg Mann <gr...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56475/
-----------------------------------------------------------

(Updated March 9, 2017, 11:47 p.m.)


Review request for mesos, Alexander Rojas, Jan Schlicht, Till Toenshoff, and Vinod Kone.


Bugs: MESOS-7004
    https://issues.apache.org/jira/browse/MESOS-7004


Repository: mesos


Description (updated)
-------

This patch adds a unit test to verify the functionality of
the `CombinedAuthenticator`. The new test is called
`CombinedAuthenticatorTest.MultipleAuthenticators`.


Diffs
-----

  src/tests/http_authentication_tests.cpp d5fabf0058755502f19eb6385bd99a0d45419508 


Diff: https://reviews.apache.org/r/56475/diff/2/


Testing (updated)
-------

The following commands were used to test:
`make check`
`bin/mesos-tests.sh --gtest_filter="*CombinedAuthenticator*" --gtest_repeat=-1 --gtest_break_on_failure`


Thanks,

Greg Mann


Re: Review Request 56475: Added a test for the 'CombinedAuthenticator'.

Posted by Greg Mann <gr...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56475/
-----------------------------------------------------------

(Updated March 9, 2017, 11:45 p.m.)


Review request for mesos, Alexander Rojas, Jan Schlicht, Till Toenshoff, and Vinod Kone.


Summary (updated)
-----------------

Added a test for the 'CombinedAuthenticator'.


Bugs: MESOS-7004
    https://issues.apache.org/jira/browse/MESOS-7004


Repository: mesos


Description (updated)
-------

This patch adds a unit test to verify the functionality of
the `CombinedAuthenticator`. The new test is called
'CombinedAuthenticatorTest.MultipleAuthenticators'.


Diffs
-----

  src/tests/http_authentication_tests.cpp d5fabf0058755502f19eb6385bd99a0d45419508 


Diff: https://reviews.apache.org/r/56475/diff/2/


Testing
-------

The following commands were used to test:
`make check`
`3rdparty/libprocess/libprocess-tests --gtest_filter="*MultipleAuthenticators*" --gtest_repeat=10000`


Thanks,

Greg Mann


Re: Review Request 56475: Added libprocess tests for multiple authenticators.

Posted by Greg Mann <gr...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56475/
-----------------------------------------------------------

(Updated March 9, 2017, 11:41 p.m.)


Review request for mesos, Alexander Rojas, Jan Schlicht, Till Toenshoff, and Vinod Kone.


Changes
-------

Reworked the patch to add tests for the Mesos-level 'CombinedAuthenticator'.


Bugs: MESOS-7004
    https://issues.apache.org/jira/browse/MESOS-7004


Repository: mesos


Description
-------

This patch adds the following libprocess tests to ensure
correct behavior when multiple authenticators are loaded
for a single realm:
  HttpAuthenticationTest.UnauthorizedMultipleAuthenticators
  HttpAuthenticationTest.ForbiddenMultipleAuthenticators
  HttpAuthenticationTest.AuthenticatedMultipleAuthenticators


Diffs (updated)
-----

  src/tests/http_authentication_tests.cpp d5fabf0058755502f19eb6385bd99a0d45419508 


Diff: https://reviews.apache.org/r/56475/diff/2/

Changes: https://reviews.apache.org/r/56475/diff/1-2/


Testing
-------

The following commands were used to test:
`make check`
`3rdparty/libprocess/libprocess-tests --gtest_filter="*MultipleAuthenticators*" --gtest_repeat=10000`


Thanks,

Greg Mann


Re: Review Request 56475: Added libprocess tests for multiple authenticators.

Posted by Jan Schlicht <ja...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56475/#review164929
-----------------------------------------------------------


Ship it!




Ship It!

- Jan Schlicht


On Feb. 9, 2017, 2:03 a.m., Greg Mann wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56475/
> -----------------------------------------------------------
> 
> (Updated Feb. 9, 2017, 2:03 a.m.)
> 
> 
> Review request for mesos, Alexander Rojas, Jan Schlicht, Till Toenshoff, and Vinod Kone.
> 
> 
> Bugs: MESOS-7004
>     https://issues.apache.org/jira/browse/MESOS-7004
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch adds the following libprocess tests to ensure
> correct behavior when multiple authenticators are loaded
> for a single realm:
>   HttpAuthenticationTest.UnauthorizedMultipleAuthenticators
>   HttpAuthenticationTest.ForbiddenMultipleAuthenticators
>   HttpAuthenticationTest.AuthenticatedMultipleAuthenticators
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/tests/http_tests.cpp fb4da9aecff0370d97a15269c5d8fffb30e0478f 
> 
> Diff: https://reviews.apache.org/r/56475/diff/
> 
> 
> Testing
> -------
> 
> The following commands were used to test:
> `make check`
> `3rdparty/libprocess/libprocess-tests --gtest_filter="*MultipleAuthenticators*" --gtest_repeat=10000`
> 
> 
> Thanks,
> 
> Greg Mann
> 
>


Re: Review Request 56475: Added a test for the 'CombinedAuthenticator'.

Posted by Greg Mann <gr...@mesosphere.io>.

> On Feb. 13, 2017, 2:31 p.m., Alexander Rojas wrote:
> > 3rdparty/libprocess/src/tests/http_tests.cpp
> > Lines 1860-1863 (patched)
> > <https://reviews.apache.org/r/56475/diff/1/?file=1628066#file1628066line1860>
> >
> >     Probably create the expected value in a variable outside of the `EXPECT_EQ`?

No longer applicable, so dropping.


- Greg


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


On March 9, 2017, 11:45 p.m., Greg Mann wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56475/
> -----------------------------------------------------------
> 
> (Updated March 9, 2017, 11:45 p.m.)
> 
> 
> Review request for mesos, Alexander Rojas, Jan Schlicht, Till Toenshoff, and Vinod Kone.
> 
> 
> Bugs: MESOS-7004
>     https://issues.apache.org/jira/browse/MESOS-7004
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch adds a unit test to verify the functionality of
> the `CombinedAuthenticator`. The new test is called
> 'CombinedAuthenticatorTest.MultipleAuthenticators'.
> 
> 
> Diffs
> -----
> 
>   src/tests/http_authentication_tests.cpp d5fabf0058755502f19eb6385bd99a0d45419508 
> 
> 
> Diff: https://reviews.apache.org/r/56475/diff/2/
> 
> 
> Testing
> -------
> 
> The following commands were used to test:
> `make check`
> `3rdparty/libprocess/libprocess-tests --gtest_filter="*MultipleAuthenticators*" --gtest_repeat=10000`
> 
> 
> Thanks,
> 
> Greg Mann
> 
>


Re: Review Request 56475: Added libprocess tests for multiple authenticators.

Posted by Alexander Rojas <al...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56475/#review165326
-----------------------------------------------------------




3rdparty/libprocess/src/tests/http_tests.cpp (lines 1817 - 1846)
<https://reviews.apache.org/r/56475/#comment237169>

    _Here and below:_
    
    This is a pure personal preference and Mesos doesn't necesarily follow the pattern (TBH, I don't always follow it), but I think blocks of related statements are grouped together, i.e.:
    
    ```c++
    MockAuthenticator *forbiddenAuthenticator = new MockAuthenticator();
    setAuthenticator("realm", Owned<Authenticator>(forbiddenAuthenticator));
    AuthenticationResult authenticationForbidden;
    authenticationForbidden.forbidden = http::Forbidden();
    EXPECT_CALL(*forbiddenAuthenticator, authenticate(_))
      .WillOnce(Return(authenticationForbidden));
    
    MockAuthenticator *basicAuthenticator = new MockAuthenticator();
    setAuthenticator("realm", Owned<Authenticator>(basicAuthenticator));
    AuthenticationResult authenticationUnauthorizedBasic;
    authenticationUnauthorizedBasic.unauthorized = 
      http::Unauthorized({"Basic realm=\"realm\""});
    EXPECT_CALL(*basicAuthenticator, authenticate(_))
      .WillOnce(Return(authenticationUnauthorizedBasic));
      
    // ... Other similar blocks.
    
    Http http;
    ```
    
    The reason I prefer this is, if you need to remove one block, you need to select one time and you remove all the related code at once. If you need to add a new block, you can copy once and paste once, it also helps with code localization (Check Code Complete, ed 2 chapter 10: General Issues in Using Variables).



3rdparty/libprocess/src/tests/http_tests.cpp (lines 1860 - 1863)
<https://reviews.apache.org/r/56475/#comment237170>

    Probably create the expected value in a variable outside of the `EXPECT_EQ`?


- Alexander Rojas


On Feb. 9, 2017, 2:03 a.m., Greg Mann wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56475/
> -----------------------------------------------------------
> 
> (Updated Feb. 9, 2017, 2:03 a.m.)
> 
> 
> Review request for mesos, Alexander Rojas, Jan Schlicht, Till Toenshoff, and Vinod Kone.
> 
> 
> Bugs: MESOS-7004
>     https://issues.apache.org/jira/browse/MESOS-7004
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch adds the following libprocess tests to ensure
> correct behavior when multiple authenticators are loaded
> for a single realm:
>   HttpAuthenticationTest.UnauthorizedMultipleAuthenticators
>   HttpAuthenticationTest.ForbiddenMultipleAuthenticators
>   HttpAuthenticationTest.AuthenticatedMultipleAuthenticators
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/tests/http_tests.cpp fb4da9aecff0370d97a15269c5d8fffb30e0478f 
> 
> Diff: https://reviews.apache.org/r/56475/diff/
> 
> 
> Testing
> -------
> 
> The following commands were used to test:
> `make check`
> `3rdparty/libprocess/libprocess-tests --gtest_filter="*MultipleAuthenticators*" --gtest_repeat=10000`
> 
> 
> Thanks,
> 
> Greg Mann
> 
>