You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Armand Grillet <ag...@mesosphere.io> on 2018/10/22 10:32:45 UTC

Review Request 69049: Added test for 'task exec'.

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

Review request for mesos and Kevin Klues.


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


Repository: mesos


Description
-------

Added test for 'task exec'.


Diffs
-----

  src/python/cli_new/lib/cli/tests/data/task/lorem-ipsum.txt PRE-CREATION 
  src/python/cli_new/lib/cli/tests/task.py b54ade557f579a489e459f6022807146e0211fb0 


Diff: https://reviews.apache.org/r/69049/diff/1/


Testing
-------

```
(mesos-cli) ?  cli_new (MESOS-6551) ? mesos-cli-tests
Running the Mesos CLI unit tests

TestAgentPlugin
test_list (cli.tests.agent.TestAgentPlugin) ... ok

TestInfrastructure
test_capture_output (cli.tests.tests.TestInfrastructure) ... ok
test_launch_binaries (cli.tests.tests.TestInfrastructure) ... ok

TestTaskPlugin
test_exec (cli.tests.task.TestTaskPlugin) ... ok
test_list (cli.tests.task.TestTaskPlugin) ... ok

----------------------------------------------------------------------
Ran 5 tests in 8.754s

OK
```


Thanks,

Armand Grillet


Re: Review Request 69049: Added test for 'task exec'.

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



PASS: Mesos patch 69049 was successfully built and tested.

Reviews applied: `['69114', '69048', '69049']`

All the build artifacts available at: http://dcos-win.westus2.cloudapp.azure.com/artifacts/mesos-reviewbot-testing/2504/mesos-review-69049

- Mesos Reviewbot Windows


On Oct. 22, 2018, 10:32 a.m., Armand Grillet wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/69049/
> -----------------------------------------------------------
> 
> (Updated Oct. 22, 2018, 10:32 a.m.)
> 
> 
> Review request for mesos and Kevin Klues.
> 
> 
> Bugs: MESOS-9341
>     https://issues.apache.org/jira/browse/MESOS-9341
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added test for 'task exec'.
> 
> 
> Diffs
> -----
> 
>   src/python/cli_new/lib/cli/tests/data/task/lorem-ipsum.txt PRE-CREATION 
>   src/python/cli_new/lib/cli/tests/task.py b54ade557f579a489e459f6022807146e0211fb0 
> 
> 
> Diff: https://reviews.apache.org/r/69049/diff/1/
> 
> 
> Testing
> -------
> 
> ```
> (mesos-cli) ?  cli_new (MESOS-6551) ? mesos-cli-tests
> Running the Mesos CLI unit tests
> 
> TestAgentPlugin
> test_list (cli.tests.agent.TestAgentPlugin) ... ok
> 
> TestInfrastructure
> test_capture_output (cli.tests.tests.TestInfrastructure) ... ok
> test_launch_binaries (cli.tests.tests.TestInfrastructure) ... ok
> 
> TestTaskPlugin
> test_exec (cli.tests.task.TestTaskPlugin) ... ok
> test_list (cli.tests.task.TestTaskPlugin) ... ok
> 
> ----------------------------------------------------------------------
> Ran 5 tests in 8.754s
> 
> OK
> ```
> 
> 
> Thanks,
> 
> Armand Grillet
> 
>


Re: Review Request 69049: Added test for 'task exec'.

Posted by Kevin Klues <kl...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/69049/#review209862
-----------------------------------------------------------


Ship it!




Ship It!

- Kevin Klues


On Okt. 22, 2018, 2:13 nachm., Armand Grillet wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/69049/
> -----------------------------------------------------------
> 
> (Updated Okt. 22, 2018, 2:13 nachm.)
> 
> 
> Review request for mesos and Kevin Klues.
> 
> 
> Bugs: MESOS-9341
>     https://issues.apache.org/jira/browse/MESOS-9341
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added test for 'task exec'.
> 
> 
> Diffs
> -----
> 
>   src/python/cli_new/lib/cli/tests/data/lorem-ipsum.txt PRE-CREATION 
>   src/python/cli_new/lib/cli/tests/task.py b54ade557f579a489e459f6022807146e0211fb0 
> 
> 
> Diff: https://reviews.apache.org/r/69049/diff/3/
> 
> 
> Testing
> -------
> 
> ```
> (mesos-cli) ?  cli_new (MESOS-6551) ? mesos-cli-tests
> Running the Mesos CLI unit tests
> 
> TestAgentPlugin
> test_list (cli.tests.agent.TestAgentPlugin) ... ok
> 
> TestInfrastructure
> test_capture_output (cli.tests.tests.TestInfrastructure) ... ok
> test_launch_binaries (cli.tests.tests.TestInfrastructure) ... ok
> 
> TestTaskPlugin
> test_exec (cli.tests.task.TestTaskPlugin) ... ok
> test_list (cli.tests.task.TestTaskPlugin) ... ok
> 
> ----------------------------------------------------------------------
> Ran 5 tests in 8.754s
> 
> OK
> ```
> 
> 
> Thanks,
> 
> Armand Grillet
> 
>


Re: Review Request 69049: Added test for 'task exec'.

Posted by Armand Grillet <ag...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/69049/
-----------------------------------------------------------

(Updated Oct. 22, 2018, 4:13 p.m.)


Review request for mesos and Kevin Klues.


Changes
-------

Fixed issues.


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


Repository: mesos


Description
-------

Added test for 'task exec'.


Diffs (updated)
-----

  src/python/cli_new/lib/cli/tests/data/lorem-ipsum.txt PRE-CREATION 
  src/python/cli_new/lib/cli/tests/task.py b54ade557f579a489e459f6022807146e0211fb0 


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

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


Testing
-------

```
(mesos-cli) ?  cli_new (MESOS-6551) ? mesos-cli-tests
Running the Mesos CLI unit tests

TestAgentPlugin
test_list (cli.tests.agent.TestAgentPlugin) ... ok

TestInfrastructure
test_capture_output (cli.tests.tests.TestInfrastructure) ... ok
test_launch_binaries (cli.tests.tests.TestInfrastructure) ... ok

TestTaskPlugin
test_exec (cli.tests.task.TestTaskPlugin) ... ok
test_list (cli.tests.task.TestTaskPlugin) ... ok

----------------------------------------------------------------------
Ran 5 tests in 8.754s

OK
```


Thanks,

Armand Grillet


Re: Review Request 69049: Added test for 'task exec'.

Posted by Kevin Klues <kl...@gmail.com>.

> On Okt. 22, 2018, 1:45 nachm., Kevin Klues wrote:
> > src/python/cli_new/lib/cli/tests/task.py
> > Lines 41 (patched)
> > <https://reviews.apache.org/r/69049/diff/1/?file=2101777#file2101777line41>
> >
> >     It seems strange to just assume we are in the correct directory when this is ran since this is just a relative path. Does this work if we run the tests from elsewhere?

We can probably just add a nother path element to the front of this with:
`os.path.dirname(os.path.realpath(__file__))`

What I don't understand yet though is how this is working until now.


- Kevin


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


On Okt. 22, 2018, 1:41 nachm., Armand Grillet wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/69049/
> -----------------------------------------------------------
> 
> (Updated Okt. 22, 2018, 1:41 nachm.)
> 
> 
> Review request for mesos and Kevin Klues.
> 
> 
> Bugs: MESOS-9341
>     https://issues.apache.org/jira/browse/MESOS-9341
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added test for 'task exec'.
> 
> 
> Diffs
> -----
> 
>   src/python/cli_new/lib/cli/tests/data/lorem-ipsum.txt PRE-CREATION 
>   src/python/cli_new/lib/cli/tests/task.py b54ade557f579a489e459f6022807146e0211fb0 
> 
> 
> Diff: https://reviews.apache.org/r/69049/diff/2/
> 
> 
> Testing
> -------
> 
> ```
> (mesos-cli) ?  cli_new (MESOS-6551) ? mesos-cli-tests
> Running the Mesos CLI unit tests
> 
> TestAgentPlugin
> test_list (cli.tests.agent.TestAgentPlugin) ... ok
> 
> TestInfrastructure
> test_capture_output (cli.tests.tests.TestInfrastructure) ... ok
> test_launch_binaries (cli.tests.tests.TestInfrastructure) ... ok
> 
> TestTaskPlugin
> test_exec (cli.tests.task.TestTaskPlugin) ... ok
> test_list (cli.tests.task.TestTaskPlugin) ... ok
> 
> ----------------------------------------------------------------------
> Ran 5 tests in 8.754s
> 
> OK
> ```
> 
> 
> Thanks,
> 
> Armand Grillet
> 
>


Re: Review Request 69049: Added test for 'task exec'.

Posted by Kevin Klues <kl...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/69049/#review209858
-----------------------------------------------------------




src/python/cli_new/lib/cli/tests/data/task/lorem-ipsum.txt
Lines 1 (patched)
<https://reviews.apache.org/r/69049/#comment294459>

    Let's put this one level up (i.e. not in a nested `task` directory).



src/python/cli_new/lib/cli/tests/task.py
Lines 41 (patched)
<https://reviews.apache.org/r/69049/#comment294460>

    It seems strange to just assume we are in the correct directory when this is ran since this is just a relative path. Does this work if we run the tests from elsewhere?



src/python/cli_new/lib/cli/tests/task.py
Lines 58-64 (patched)
<https://reviews.apache.org/r/69049/#comment294461>

    This seems really messy at first glance. Is there some way to clean this up so it's easier to read?
    
    Maybe just a comment on what we are doing here will suffice.



src/python/cli_new/lib/cli/tests/task.py
Lines 74-75 (patched)
<https://reviews.apache.org/r/69049/#comment294462>

    What is going on here? Why are we actually using a bare-raise here?



src/python/cli_new/lib/cli/tests/task.py
Lines 82 (patched)
<https://reviews.apache.org/r/69049/#comment294463>

    We shouldn't have to decode here anymore after moving the `exec_command` to use `universal_newline`.


- Kevin Klues


On Okt. 22, 2018, 1:41 nachm., Armand Grillet wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/69049/
> -----------------------------------------------------------
> 
> (Updated Okt. 22, 2018, 1:41 nachm.)
> 
> 
> Review request for mesos and Kevin Klues.
> 
> 
> Bugs: MESOS-9341
>     https://issues.apache.org/jira/browse/MESOS-9341
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added test for 'task exec'.
> 
> 
> Diffs
> -----
> 
>   src/python/cli_new/lib/cli/tests/data/lorem-ipsum.txt PRE-CREATION 
>   src/python/cli_new/lib/cli/tests/task.py b54ade557f579a489e459f6022807146e0211fb0 
> 
> 
> Diff: https://reviews.apache.org/r/69049/diff/2/
> 
> 
> Testing
> -------
> 
> ```
> (mesos-cli) ?  cli_new (MESOS-6551) ? mesos-cli-tests
> Running the Mesos CLI unit tests
> 
> TestAgentPlugin
> test_list (cli.tests.agent.TestAgentPlugin) ... ok
> 
> TestInfrastructure
> test_capture_output (cli.tests.tests.TestInfrastructure) ... ok
> test_launch_binaries (cli.tests.tests.TestInfrastructure) ... ok
> 
> TestTaskPlugin
> test_exec (cli.tests.task.TestTaskPlugin) ... ok
> test_list (cli.tests.task.TestTaskPlugin) ... ok
> 
> ----------------------------------------------------------------------
> Ran 5 tests in 8.754s
> 
> OK
> ```
> 
> 
> Thanks,
> 
> Armand Grillet
> 
>


Re: Review Request 69049: Added test for 'task exec'.

Posted by Armand Grillet <ag...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/69049/
-----------------------------------------------------------

(Updated Oct. 22, 2018, 3:41 p.m.)


Review request for mesos and Kevin Klues.


Changes
-------

Moved test data.


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


Repository: mesos


Description
-------

Added test for 'task exec'.


Diffs (updated)
-----

  src/python/cli_new/lib/cli/tests/data/lorem-ipsum.txt PRE-CREATION 
  src/python/cli_new/lib/cli/tests/task.py b54ade557f579a489e459f6022807146e0211fb0 


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

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


Testing
-------

```
(mesos-cli) ?  cli_new (MESOS-6551) ? mesos-cli-tests
Running the Mesos CLI unit tests

TestAgentPlugin
test_list (cli.tests.agent.TestAgentPlugin) ... ok

TestInfrastructure
test_capture_output (cli.tests.tests.TestInfrastructure) ... ok
test_launch_binaries (cli.tests.tests.TestInfrastructure) ... ok

TestTaskPlugin
test_exec (cli.tests.task.TestTaskPlugin) ... ok
test_list (cli.tests.task.TestTaskPlugin) ... ok

----------------------------------------------------------------------
Ran 5 tests in 8.754s

OK
```


Thanks,

Armand Grillet