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


Fix it, then Ship it!





src/tests/slave_tests.cpp (lines 4952 - 4953)
<https://reviews.apache.org/r/55888/#comment237960>

    "Authorize run task" is very broad. At least in the comment can we make 
clear that we are specifically testing using the RUN_TASK ACL to whitelist 
users?



src/tests/slave_tests.cpp (line 4958)
<https://reviews.apache.org/r/55888/#comment237934>

    s/current/the current/



src/tests/slave_tests.cpp (line 4964)
<https://reviews.apache.org/r/55888/#comment237935>

    s/current/the current/



src/tests/slave_tests.cpp (line 4965)
<https://reviews.apache.org/r/55888/#comment237936>

    s/users/user/



src/tests/slave_tests.cpp (line 5040)
<https://reviews.apache.org/r/55888/#comment237937>

    s/Status Updates/status updates/



src/tests/slave_tests.cpp (lines 5041 - 5054)
<https://reviews.apache.org/r/55888/#comment237941>

    It feels that the following is more straightforward (which avoids the issue 
of ordering and looping/if conditions altogether).
    
    ```
    hashmap<TaskID, TaskStatus> statues(
        {{status1->task_id(), status1.get()},
        {{status2->task_id(), status2.get()}}});
    
    ASSERT_TRUE(statues.contains(task1.task_id());
    EXPECT_EQ(TASK_ERROR, statues.at(task1.task_id()).state());
    EXPECT_EQ(TaskStatus::SOURCE_SLAVE, statues.at(task1.task_id()).source());
    EXPECT_EQ(TaskStatus::REASON_TASK_UNAUTHORIZED, 
              statues.at(task1.task_id()).reason());
    
    ASSERT_TRUE(statues.contains(task2.task_id());
    EXPECT_EQ(TASK_RUNNING, statues.at(task2.task_id()).state());
    ```


- Jiang Yan Xu


On Feb. 7, 2017, 7:54 p.m., Anindya Sinha wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55888/
> -----------------------------------------------------------
> 
> (Updated Feb. 7, 2017, 7:54 p.m.)
> 
> 
> Review request for mesos, Adam B, Alexander Rojas, and Jiang Yan Xu.
> 
> 
> Bugs: MESOS-6953
>     https://issues.apache.org/jira/browse/MESOS-6953
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Test to ensure non-authorized users cannot launch tasks on agents.
> 
> 
> Diffs
> -----
> 
>   src/tests/slave_tests.cpp 7f357a653335b559b5c78d4618926715dc4a63c7 
> 
> Diff: https://reviews.apache.org/r/55888/diff/
> 
> 
> Testing
> -------
> 
> All tests passed.
> 
> 
> Thanks,
> 
> Anindya Sinha
> 
>

Reply via email to